File tsocks.spec of Package tsocks

Name:           tsocks
Version:        1.8.beta5
Release:        1
License:        GPL-2.0+
Group:          Productivity/Networking/Other
Summary:        Provide transparent network access through a SOCKS proxy
Patch0:         00_patch_from_1.8beta5-9.2.patch
Patch1:         01_symbolexport.patch
Patch2:         02_hyphenfix.patch
Patch3:         03_fixloop.patch
Patch4:         04_getpeername.patch
Patch5:         05_config_in_home.patch
Patch6:         06_fallback.patch
Patch7:         07_tsocks-1.8_beta5-hostname-config-fix.patch
Patch8:         08_manpages-fixes.patch
Patch9:         09_multiarch_paths.patch
Patch10:        10_hardening.patch
Patch11:        11_always_init_function_pointers.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf automake libtool

tsocks provides transparent network access through
a SOCKS version 4 or 5 proxy (usually on a firewall).
tsocks intercepts the calls applications make
to establish TCP connections and transparently
proxies them as necessary.

%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1

autoreconf -fi
# the saveme binary is built statically but not even packaged -> disable
sed -i '/^SAVE /d' Makefile
make %{?_smp_mflags}

install -D -m 0644 tsocks.conf.simple.example %{buildroot}%{_sysconfdir}/tsocks.conf
sed 's:@@LIBDIR@@:%{_libdir}:' %{SOURCE1} > %{buildroot}%{_bindir}/tsocks

rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%doc ChangeLog COPYING tsocks.conf.simple.example tsocks.conf.complex.example
%doc %{_mandir}/man?/*
%config(noreplace) %{_sysconfdir}/tsocks.conf