+%define pre pre2
Summary: A free Socks v4/v5 client implementation
-Summary(pl): Implementacja klienta Socks v4/5
+Summary(pl): Darmowa implementacja klienta Socks v4/5
Name: dante
-Version: 1.1.9
-Release: 1
+Version: 1.1.15
+Release: 0.%{pre}.1
License: BSD-like
Group: Networking/Daemons
-Source0: ftp://ftp.inet.no/pub/socks/%{name}-%{version}.tar.gz
+Source0: ftp://ftp.inet.no/pub/socks/%{name}-%{version}-%{pre}.tar.gz
+# Source0-md5: 87a955db77c6a4fd2d5a7c172fd76a8b
Source1: sockd.init
URL: http://www.inet.no/dante/
+BuildRequires: autoconf
+BuildRequires: automake
BuildRequires: libwrap-devel
-Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Dante is a free implementation of the proxy protocols socks version 4,
%package server
Summary: A free Socks v4/v5 server implementation
-Summary(pl): Implementacja serwera Socks v4/5
+Summary(pl): Darmowa implementacja serwera Socks v4/5
Group: Networking/Daemons
-Requires: %{name} = %{version}
-Prereq: /sbin/chkconfig
+Requires: %{name} = %{version}-%{release}
+PreReq: rc-scripts
+Requires(post,preun): /sbin/chkconfig
%description server
This package contains the socks proxy daemon and its documentation.
klienci mog± ³±czyæ siê z serwerami w sieci.
%package devel
-Summary: development libraries for socks
+Summary: Development libraries for socks
Summary(pl): Biblioteki developerskie dla socks
Group: Networking/Daemons
-Requires: %{name} = %{version}
+Requires: %{name} = %{version}-%{release}
%description devel
Additional libraries required to compile programs that use socks.
Summary: Static libraries for socks
Summary(pl): Statyczne biblioteki socks
Group: Networking/Daemons
-Requires: %{name}-devel = %{version}
+Requires: %{name}-devel = %{version}-%{release}
%description static
Static libraries for socks.
Statyczne biblioteki socks.
%prep
-%setup -q
+%setup -q -n %{name}-%{version}-%{pre}
%build
-%configure2_13
+cp -f /usr/share/automake/config.sub .
+%{__autoconf}
+%configure \
+ --disable-preload
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-%{__install} -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d}
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-%{__install} example/sock{s,d}.conf ${RPM_BUILD_ROOT}%{_sysconfdir}
+install example/sock{s,d}.conf ${RPM_BUILD_ROOT}%{_sysconfdir}
-%{__install} %{SOURCE1} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/sockd
-
-gzip -9nf BUGS CREDITS LICENSE NEWS README SUPPORT TODO
+install %{SOURCE1} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/sockd
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
%post server
/sbin/chkconfig --add sockd
+if [ -f /var/lock/subsys/sockd ]; then
+ /etc/rc.d/init.d/sockd restart 1>&2
+else
+ echo "Run \"/etc/rc.d/init.d/sockd start\" to start dante sockd daemon."
+fi
%postun server
-if [ $1 = 0 ]; then
+if [ "$1" = "0" ]; then
+ if [ -f /var/lock/subsys/sockd ]; then
+ /etc/rc.d/init.d/sockd stop 1>&2
+ fi
/sbin/chkconfig --del sockd
fi
%files
%defattr(644,root,root,755)
-%doc *.gz
+%doc BUGS CREDITS LICENSE NEWS README SUPPORT TODO
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/socks.conf
%attr(755,root,root) %{_libdir}/lib*.so.*.*
%attr(755,root,root) %{_bindir}/socksify
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/lib*.so
-%attr(755,root,root) %{_libdir}/lib*.la
+%{_libdir}/lib*.la
%{_includedir}/*
%files static