|
1 ## |
|
2 ## tsocks.spec -- OpenPKG RPM Package Specification |
|
3 ## Copyright (c) 2000-2008 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 versions |
|
25 %define V_base 1.8 |
|
26 %define V_opkg 1.8b5 |
|
27 %define V_dist 1.8beta5 |
|
28 |
|
29 # package information |
|
30 Name: tsocks |
|
31 Summary: Transparent SOCKS Client Library |
|
32 URL: http://tsocks.sourceforge.net/ |
|
33 Vendor: Shaun Clowes |
|
34 Packager: OpenPKG Foundation e.V. |
|
35 Distribution: OpenPKG Community |
|
36 Class: PLUS |
|
37 Group: Network |
|
38 License: LGPL |
|
39 Version: %{V_opkg} |
|
40 Release: 20080101 |
|
41 |
|
42 # list of sources |
|
43 Source0: http://switch.dl.sourceforge.net/tsocks/tsocks-%{V_dist}.tar.gz |
|
44 Source1: tsocks.conf |
|
45 Patch0: tsocks.patch |
|
46 |
|
47 # build information |
|
48 Prefix: %{l_prefix} |
|
49 BuildRoot: %{l_buildroot} |
|
50 BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make |
|
51 PreReq: OpenPKG, openpkg >= 20040130 |
|
52 AutoReq: no |
|
53 AutoReqProv: no |
|
54 |
|
55 %description |
|
56 TSOCKS' role is to allow non-SOCKS aware applications (e.g telnet, |
|
57 ssh, ftp etc) to use SOCKS without any modification. It does this by |
|
58 intercepting the calls that applications make to establish network |
|
59 connections and negotating them through a SOCKS server as necessary. |
|
60 |
|
61 %track |
|
62 prog tsocks = { |
|
63 version = %{V_dist} |
|
64 url = http://prdownloads.sourceforge.net/tsocks/ |
|
65 regex = tsocks-(__VER__)\.tar\.gz |
|
66 } |
|
67 |
|
68 %prep |
|
69 %setup -q -n tsocks-%{V_base} |
|
70 %patch -p0 |
|
71 %{l_shtool} subst \ |
|
72 -e 's;/usr/lib/libtsocks;%{l_prefix}/lib/tsocks/libtsocks;g' \ |
|
73 tsocks |
|
74 |
|
75 %build |
|
76 if [ ! -f /lib/libdl.so ] && [ ! -f /usr/lib/libdl.so ]; then |
|
77 %{l_shtool} subst -e 's;-ldl;-lc;' configure |
|
78 fi |
|
79 CC="%{l_cc}" \ |
|
80 CFLAGS="%{l_cflags -O}" \ |
|
81 CPPFLAGS="%{l_cppflags}" \ |
|
82 LDFLAGS="%{l_ldflags}" \ |
|
83 ./configure \ |
|
84 --prefix=%{l_prefix} \ |
|
85 --libdir=%{l_prefix}/lib/tsocks \ |
|
86 --with-conf=%{l_prefix}/etc/tsocks/tsocks.conf |
|
87 %{l_make} %{l_mflags -O} |
|
88 |
|
89 %install |
|
90 rm -rf $RPM_BUILD_ROOT |
|
91 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
|
92 %{l_shtool} mkdir -f -p -m 755 \ |
|
93 $RPM_BUILD_ROOT%{l_prefix}/etc/tsocks |
|
94 %{l_shtool} install -c -m 755 \ |
|
95 %{SOURCE tsocks.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/tsocks/ |
|
96 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
97 %{l_files_std} \ |
|
98 '%config %{l_prefix}/etc/tsocks/tsocks.conf' |
|
99 |
|
100 %files -f files |
|
101 |
|
102 %clean |
|
103 rm -rf $RPM_BUILD_ROOT |
|
104 |