1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tsocks/tsocks.spec Sun Aug 24 13:48:12 2014 +0200 1.3 @@ -0,0 +1,104 @@ 1.4 +## 1.5 +## tsocks.spec -- OpenPKG RPM Package Specification 1.6 +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## 1.8 +## Permission to use, copy, modify, and distribute this software for 1.9 +## any purpose with or without fee is hereby granted, provided that 1.10 +## the above copyright notice and this permission notice appear in all 1.11 +## copies. 1.12 +## 1.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.24 +## SUCH DAMAGE. 1.25 +## 1.26 + 1.27 +# package versions 1.28 +%define V_base 1.8 1.29 +%define V_opkg 1.8b5 1.30 +%define V_dist 1.8beta5 1.31 + 1.32 +# package information 1.33 +Name: tsocks 1.34 +Summary: Transparent SOCKS Client Library 1.35 +URL: http://tsocks.sourceforge.net/ 1.36 +Vendor: Shaun Clowes 1.37 +Packager: OpenPKG Foundation e.V. 1.38 +Distribution: OpenPKG Community 1.39 +Class: PLUS 1.40 +Group: Network 1.41 +License: LGPL 1.42 +Version: %{V_opkg} 1.43 +Release: 20080101 1.44 + 1.45 +# list of sources 1.46 +Source0: http://switch.dl.sourceforge.net/tsocks/tsocks-%{V_dist}.tar.gz 1.47 +Source1: tsocks.conf 1.48 +Patch0: tsocks.patch 1.49 + 1.50 +# build information 1.51 +Prefix: %{l_prefix} 1.52 +BuildRoot: %{l_buildroot} 1.53 +BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make 1.54 +PreReq: OpenPKG, openpkg >= 20040130 1.55 +AutoReq: no 1.56 +AutoReqProv: no 1.57 + 1.58 +%description 1.59 + TSOCKS' role is to allow non-SOCKS aware applications (e.g telnet, 1.60 + ssh, ftp etc) to use SOCKS without any modification. It does this by 1.61 + intercepting the calls that applications make to establish network 1.62 + connections and negotating them through a SOCKS server as necessary. 1.63 + 1.64 +%track 1.65 + prog tsocks = { 1.66 + version = %{V_dist} 1.67 + url = http://prdownloads.sourceforge.net/tsocks/ 1.68 + regex = tsocks-(__VER__)\.tar\.gz 1.69 + } 1.70 + 1.71 +%prep 1.72 + %setup -q -n tsocks-%{V_base} 1.73 + %patch -p0 1.74 + %{l_shtool} subst \ 1.75 + -e 's;/usr/lib/libtsocks;%{l_prefix}/lib/tsocks/libtsocks;g' \ 1.76 + tsocks 1.77 + 1.78 +%build 1.79 + if [ ! -f /lib/libdl.so ] && [ ! -f /usr/lib/libdl.so ]; then 1.80 + %{l_shtool} subst -e 's;-ldl;-lc;' configure 1.81 + fi 1.82 + CC="%{l_cc}" \ 1.83 + CFLAGS="%{l_cflags -O}" \ 1.84 + CPPFLAGS="%{l_cppflags}" \ 1.85 + LDFLAGS="%{l_ldflags}" \ 1.86 + ./configure \ 1.87 + --prefix=%{l_prefix} \ 1.88 + --libdir=%{l_prefix}/lib/tsocks \ 1.89 + --with-conf=%{l_prefix}/etc/tsocks/tsocks.conf 1.90 + %{l_make} %{l_mflags -O} 1.91 + 1.92 +%install 1.93 + rm -rf $RPM_BUILD_ROOT 1.94 + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.95 + %{l_shtool} mkdir -f -p -m 755 \ 1.96 + $RPM_BUILD_ROOT%{l_prefix}/etc/tsocks 1.97 + %{l_shtool} install -c -m 755 \ 1.98 + %{SOURCE tsocks.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/tsocks/ 1.99 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 1.100 + %{l_files_std} \ 1.101 + '%config %{l_prefix}/etc/tsocks/tsocks.conf' 1.102 + 1.103 +%files -f files 1.104 + 1.105 +%clean 1.106 + rm -rf $RPM_BUILD_ROOT 1.107 +