tsocks/tsocks.spec

Sun, 24 Aug 2014 13:49:27 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 24 Aug 2014 13:49:27 +0200
changeset 794
07be25b95aca
parent 793
07d23947ec91
permissions
-rw-r--r--

Accommodate architecture segregated lib(32|64|...) library paths.

     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 ##
    24 #   package versions
    25 %define       V_base 1.8
    26 %define       V_opkg 1.8b5
    27 %define       V_dist 1.8beta5
    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:      20140800
    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
    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
    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.
    61 %track
    62     prog tsocks = {
    63         version   = %{V_dist}
    64         url       = http://prdownloads.sourceforge.net/tsocks/
    65         regex     = tsocks-(__VER__)\.tar\.gz
    66     }
    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
    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}
    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'
   100 %files -f files
   102 %clean
   103     rm -rf $RPM_BUILD_ROOT

mercurial