Import package vendor original specs for necessary manipulations.

Sun, 24 Aug 2014 13:48:12 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 24 Aug 2014 13:48:12 +0200
changeset 793
07d23947ec91
parent 792
e4d1703d7593
child 794
07be25b95aca

Import package vendor original specs for necessary manipulations.

tsocks/tsocks.conf file | annotate | diff | comparison | revisions
tsocks/tsocks.patch file | annotate | diff | comparison | revisions
tsocks/tsocks.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tsocks/tsocks.conf	Sun Aug 24 13:48:12 2014 +0200
     1.3 @@ -0,0 +1,15 @@
     1.4 +##
     1.5 +##  tsocks.conf -- Transparent SOCKS Client Configuration
     1.6 +##
     1.7 +
     1.8 +#   local networks
     1.9 +local       = 127.0.0.0/255.0.0.0
    1.10 +local       = 192.168.0.0/255.255.255.0
    1.11 +local       = 172.16.0.0/255.240.0.0
    1.12 +local       = 10.0.0.0/255.0.0.0
    1.13 +
    1.14 +#   SOCKS proxy server
    1.15 +server      = 127.0.0.1  
    1.16 +server_port = 1080 
    1.17 +server_type = 5
    1.18 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tsocks/tsocks.patch	Sun Aug 24 13:48:12 2014 +0200
     2.3 @@ -0,0 +1,54 @@
     2.4 +Index: Makefile.in
     2.5 +--- Makefile.in.orig	2002-03-16 11:12:40.000000000 +0100
     2.6 ++++ Makefile.in	2005-10-03 12:41:14.784073276 +0200
     2.7 +@@ -47,7 +47,7 @@
     2.8 + 	${SHCC} ${CFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} 
     2.9 + 
    2.10 + ${SAVE}: ${SAVE}.c
    2.11 +-	${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c
    2.12 ++	${SHCC} ${CFLAGS} ${INCLUDES} -o ${SAVE} ${SAVE}.c
    2.13 + 
    2.14 + ${SHLIB}: ${OBJS} ${COMMON}.o ${PARSER}.o
    2.15 + 	${SHCC} ${CFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS}
    2.16 +Index: configure
    2.17 +--- configure.orig	2002-07-16 00:51:08.000000000 +0200
    2.18 ++++ configure	2005-10-03 12:39:39.531996286 +0200
    2.19 +@@ -2151,6 +2151,7 @@
    2.20 + #line 2152 "configure"
    2.21 + #include "confdefs.h"
    2.22 + 
    2.23 ++      #include <sys/types.h>
    2.24 +       #include <sys/socket.h>
    2.25 +       int connect($testproto);
    2.26 +     
    2.27 +@@ -2227,14 +2228,17 @@
    2.28 + 
    2.29 + echo $ac_n "checking for correct poll prototype""... $ac_c" 1>&6
    2.30 + echo "configure:2230: checking for correct poll prototype" >&5
    2.31 +-PROTO=
    2.32 +-for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout' 
    2.33 ++PROTO1="struct pollfd ufds[], nfds_t nfds, int timeout"
    2.34 ++PROTO2="struct pollfd *ufds, unsigned int nfds, int timeout"
    2.35 ++PROTO3="struct pollfd *ufds, nfds_t nfds, int timeout"
    2.36 ++for PROTO in "$PROTO1" "$PROTO2" "$PROTO3"
    2.37 + do
    2.38 +   if test "${PROTO}" = ""; then
    2.39 +     cat > conftest.$ac_ext <<EOF
    2.40 + #line 2236 "configure"
    2.41 + #include "confdefs.h"
    2.42 + 
    2.43 ++      #include <sys/types.h>
    2.44 +       #include <sys/poll.h>
    2.45 +       int poll($testproto);
    2.46 +     
    2.47 +Index: parser.c
    2.48 +--- parser.c.orig	2002-03-13 13:34:22.000000000 +0100
    2.49 ++++ parser.c	2005-10-03 12:39:39.532768730 +0200
    2.50 +@@ -4,6 +4,7 @@
    2.51 + 
    2.52 + */
    2.53 + 
    2.54 ++#include <sys/types.h>
    2.55 + #include <netinet/in.h>
    2.56 + #include <sys/socket.h>
    2.57 + #include <arpa/inet.h>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tsocks/tsocks.spec	Sun Aug 24 13:48:12 2014 +0200
     3.3 @@ -0,0 +1,104 @@
     3.4 +##
     3.5 +##  tsocks.spec -- OpenPKG RPM Package Specification
     3.6 +##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     3.7 +##
     3.8 +##  Permission to use, copy, modify, and distribute this software for
     3.9 +##  any purpose with or without fee is hereby granted, provided that
    3.10 +##  the above copyright notice and this permission notice appear in all
    3.11 +##  copies.
    3.12 +##
    3.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    3.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    3.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    3.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    3.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    3.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    3.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    3.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    3.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    3.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    3.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    3.24 +##  SUCH DAMAGE.
    3.25 +##
    3.26 +
    3.27 +#   package versions
    3.28 +%define       V_base 1.8
    3.29 +%define       V_opkg 1.8b5
    3.30 +%define       V_dist 1.8beta5
    3.31 +
    3.32 +#   package information
    3.33 +Name:         tsocks
    3.34 +Summary:      Transparent SOCKS Client Library
    3.35 +URL:          http://tsocks.sourceforge.net/
    3.36 +Vendor:       Shaun Clowes
    3.37 +Packager:     OpenPKG Foundation e.V.
    3.38 +Distribution: OpenPKG Community
    3.39 +Class:        PLUS
    3.40 +Group:        Network
    3.41 +License:      LGPL
    3.42 +Version:      %{V_opkg}
    3.43 +Release:      20080101
    3.44 +
    3.45 +#   list of sources
    3.46 +Source0:      http://switch.dl.sourceforge.net/tsocks/tsocks-%{V_dist}.tar.gz
    3.47 +Source1:      tsocks.conf
    3.48 +Patch0:       tsocks.patch
    3.49 +
    3.50 +#   build information
    3.51 +Prefix:       %{l_prefix}
    3.52 +BuildRoot:    %{l_buildroot}
    3.53 +BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make
    3.54 +PreReq:       OpenPKG, openpkg >= 20040130
    3.55 +AutoReq:      no
    3.56 +AutoReqProv:  no
    3.57 +
    3.58 +%description
    3.59 +    TSOCKS' role is to allow non-SOCKS aware applications (e.g telnet,
    3.60 +    ssh, ftp etc) to use SOCKS without any modification. It does this by
    3.61 +    intercepting the calls that applications make to establish network
    3.62 +    connections and negotating them through a SOCKS server as necessary.
    3.63 +
    3.64 +%track
    3.65 +    prog tsocks = {
    3.66 +        version   = %{V_dist}
    3.67 +        url       = http://prdownloads.sourceforge.net/tsocks/
    3.68 +        regex     = tsocks-(__VER__)\.tar\.gz
    3.69 +    }
    3.70 +
    3.71 +%prep
    3.72 +    %setup -q -n tsocks-%{V_base}
    3.73 +    %patch -p0
    3.74 +    %{l_shtool} subst \
    3.75 +        -e 's;/usr/lib/libtsocks;%{l_prefix}/lib/tsocks/libtsocks;g' \
    3.76 +        tsocks
    3.77 +
    3.78 +%build
    3.79 +    if [ ! -f /lib/libdl.so ] && [ ! -f /usr/lib/libdl.so ]; then
    3.80 +        %{l_shtool} subst -e 's;-ldl;-lc;' configure
    3.81 +    fi
    3.82 +    CC="%{l_cc}" \
    3.83 +    CFLAGS="%{l_cflags -O}" \
    3.84 +    CPPFLAGS="%{l_cppflags}" \
    3.85 +    LDFLAGS="%{l_ldflags}" \
    3.86 +    ./configure \
    3.87 +        --prefix=%{l_prefix} \
    3.88 +        --libdir=%{l_prefix}/lib/tsocks \
    3.89 +        --with-conf=%{l_prefix}/etc/tsocks/tsocks.conf
    3.90 +    %{l_make} %{l_mflags -O}
    3.91 +
    3.92 +%install
    3.93 +    rm -rf $RPM_BUILD_ROOT
    3.94 +    %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    3.95 +    %{l_shtool} mkdir -f -p -m 755 \
    3.96 +        $RPM_BUILD_ROOT%{l_prefix}/etc/tsocks
    3.97 +    %{l_shtool} install -c -m 755 \
    3.98 +        %{SOURCE tsocks.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/tsocks/
    3.99 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   3.100 +        %{l_files_std} \
   3.101 +        '%config %{l_prefix}/etc/tsocks/tsocks.conf'
   3.102 +
   3.103 +%files -f files
   3.104 +
   3.105 +%clean
   3.106 +    rm -rf $RPM_BUILD_ROOT
   3.107 +

mercurial