michael@793: ## michael@793: ## tsocks.spec -- OpenPKG RPM Package Specification michael@793: ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. michael@793: ## michael@793: ## Permission to use, copy, modify, and distribute this software for michael@793: ## any purpose with or without fee is hereby granted, provided that michael@793: ## the above copyright notice and this permission notice appear in all michael@793: ## copies. michael@793: ## michael@793: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@793: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@793: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@793: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@793: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@793: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@793: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@793: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@793: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@793: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@793: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@793: ## SUCH DAMAGE. michael@793: ## michael@793: michael@793: # package versions michael@793: %define V_base 1.8 michael@793: %define V_opkg 1.8b5 michael@793: %define V_dist 1.8beta5 michael@793: michael@793: # package information michael@793: Name: tsocks michael@793: Summary: Transparent SOCKS Client Library michael@793: URL: http://tsocks.sourceforge.net/ michael@793: Vendor: Shaun Clowes michael@793: Packager: OpenPKG Foundation e.V. michael@793: Distribution: OpenPKG Community michael@793: Class: PLUS michael@793: Group: Network michael@793: License: LGPL michael@793: Version: %{V_opkg} michael@794: Release: 20140800 michael@793: michael@793: # list of sources michael@793: Source0: http://switch.dl.sourceforge.net/tsocks/tsocks-%{V_dist}.tar.gz michael@793: Source1: tsocks.conf michael@793: Patch0: tsocks.patch michael@793: michael@793: # build information michael@793: Prefix: %{l_prefix} michael@793: BuildRoot: %{l_buildroot} michael@793: BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make michael@793: PreReq: OpenPKG, openpkg >= 20040130 michael@793: AutoReq: no michael@793: AutoReqProv: no michael@793: michael@793: %description michael@793: TSOCKS' role is to allow non-SOCKS aware applications (e.g telnet, michael@793: ssh, ftp etc) to use SOCKS without any modification. It does this by michael@793: intercepting the calls that applications make to establish network michael@793: connections and negotating them through a SOCKS server as necessary. michael@793: michael@793: %track michael@793: prog tsocks = { michael@793: version = %{V_dist} michael@793: url = http://prdownloads.sourceforge.net/tsocks/ michael@793: regex = tsocks-(__VER__)\.tar\.gz michael@793: } michael@793: michael@793: %prep michael@793: %setup -q -n tsocks-%{V_base} michael@793: %patch -p0 michael@793: %{l_shtool} subst \ michael@793: -e 's;/usr/lib/libtsocks;%{l_prefix}/lib/tsocks/libtsocks;g' \ michael@793: tsocks michael@793: michael@793: %build michael@794: if [ ! -f /lib*/libdl.so ] && [ ! -f /usr/lib*/libdl.so ]; then michael@793: %{l_shtool} subst -e 's;-ldl;-lc;' configure michael@793: fi michael@793: CC="%{l_cc}" \ michael@793: CFLAGS="%{l_cflags -O}" \ michael@793: CPPFLAGS="%{l_cppflags}" \ michael@793: LDFLAGS="%{l_ldflags}" \ michael@793: ./configure \ michael@793: --prefix=%{l_prefix} \ michael@793: --libdir=%{l_prefix}/lib/tsocks \ michael@793: --with-conf=%{l_prefix}/etc/tsocks/tsocks.conf michael@793: %{l_make} %{l_mflags -O} michael@793: michael@793: %install michael@793: rm -rf $RPM_BUILD_ROOT michael@793: %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT michael@793: %{l_shtool} mkdir -f -p -m 755 \ michael@793: $RPM_BUILD_ROOT%{l_prefix}/etc/tsocks michael@793: %{l_shtool} install -c -m 755 \ michael@793: %{SOURCE tsocks.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/tsocks/ michael@793: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@793: %{l_files_std} \ michael@793: '%config %{l_prefix}/etc/tsocks/tsocks.conf' michael@793: michael@793: %files -f files michael@793: michael@793: %clean michael@793: rm -rf $RPM_BUILD_ROOT michael@793: