socat/socat.spec

changeset 507
b38213c8f8c3
child 508
46679bda6e96
equal deleted inserted replaced
-1:000000000000 0:a37108dff886
1 ##
2 ## socat.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
23
24 # package version
25 %define V_major 1.7.2
26 %define V_minor 1
27
28 # package information
29 Name: socat
30 Summary: Socket Client
31 URL: http://www.dest-unreach.org/socat/
32 Vendor: Gerhard Rieger
33 Packager: OpenPKG Foundation e.V.
34 Distribution: OpenPKG Community
35 Class: BASE
36 Group: Network
37 License: GPL
38 Version: %{V_major}.%{V_minor}
39 Release: 20120515
40
41 # package options
42 %option with_readline yes
43 %option with_ssl yes
44
45 # list of sources
46 Source0: http://www.dest-unreach.org/socat/download/socat-%{V_major}.%{V_minor}.tar.bz2
47
48 # build information
49 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc
50 PreReq: OpenPKG, openpkg >= 20100101
51 %if "%{with_readline}" == "yes"
52 BuildPreReq: readline
53 PreReq: readline
54 %endif
55 %if "%{with_ssl}" == "yes"
56 BuildPreReq: openssl
57 PreReq: openssl
58 %endif
59
60 %description
61 Socat is a relay for bi-directional data transfer between two
62 independent data channels. Each of these data channels may be a
63 file, pipe, device (terminal, modem, etc), socket (UNIX, IP4, IP6,
64 raw, UDP, TCP), a file descriptor (stdin, etc), a program, or an
65 arbitrary combination of two of these.
66
67 %track
68 prog socat = {
69 version = %{version}
70 url = http://www.dest-unreach.org/socat/download/
71 regex = socat-(\d+\.\d+\.\d+(?:\.\d+))\.tar\.bz2
72 }
73
74 %prep
75 %setup -q -n socat-%{V_major}.%{V_minor}
76
77 %build
78 CC="%{l_cc} %{l_cflags -O} %{l_cppflags}" \
79 CFLAGS="%{l_cflags -O} %{l_cppflags}" \
80 CPPFLAGS="%{l_cppflags}" \
81 LDFLAGS="%{l_ldflags}" \
82 ./configure \
83 --prefix=%{l_prefix} \
84 --mandir=%{l_prefix}/man \
85 --enable-msglevel=debug \
86 %if "%{with_readline}" == "yes"
87 --enable-readline \
88 %else
89 --disable-readline \
90 %endif
91 %if "%{with_ssl}" == "yes"
92 --enable-openssl \
93 %else
94 --disable-openssl \
95 %endif
96 --disable-libwrap
97
98 %{l_make} %{l_mflags -O}
99
100 %install
101 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
102 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
103 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
104
105 %files -f files
106
107 %clean
108

mercurial