Release: 1
License: BSD-type
Group: Networking/Daemons
-URL: http://www.inet.no/dante/
+Group(de): Netzwerkwesen/Server
+Group(pl): Sieciowe/Serwery
Source0: ftp://ftp.inet.no/pub/socks/%{name}-%{version}.tar.gz
Source1: sockd.init
+URL: http://www.inet.no/dante/
+BuildRequires: libwrap-devel
Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define prefix %{_prefix}
-
%description
Dante is a free implementation of the proxy protocols socks version 4,
socks version 5 (rfc1928) and msproxy. It can be used as a firewall
%package server
Summary: A free Socks v4/v5 server implementation
Group: Networking/Daemons
-Requires: dante = %{version}
+Group(de): Netzwerkwesen/Server
+Group(pl): Sieciowe/Serwery
+Requires: %{name} = %{version}
%description server
This package contains the socks proxy daemon and its documentation.
%package devel
Summary: development libraries for socks
Group: Networking/Daemons
-Requires: dante = %{version}
+Group(de): Netzwerkwesen/Server
+Group(pl): Sieciowe/Serwery
+Requires: %{name} = %{version}
%description devel
Additional libraries required to compile programs that use socks.
-%prep
-rm -rf $RPM_BUILD_ROOT
+%package static
+Summary: static libraries for socks
+Group: Networking/Daemons
+Group(de): Netzwerkwesen/Server
+Group(pl): Sieciowe/Serwery
+Requires: %{name}-devel = %{version}
+
+%description static
+Static libraries for socks.
+%prep
%setup -q
%build
-
-CFLAGS="${RPM_OPT_FLAGS}"
-%configure --prefix=%{_prefix}
+%configure
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
+%{__install} -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d}
-%{__make} install DESTDIR=${RPM_BUILD_ROOT}
+%{__make} install DESTDIR=$RPM_BUILD_ROOT
-#set library as executable - prevent ldd from complaining
-chmod +x ${RPM_BUILD_ROOT}%{_libdir}/*.so.*.*
+%{__install} example/sock{s,d}.conf ${RPM_BUILD_ROOT}%{_sysconfdir}
-install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d ${RPM_BUILD_ROOT}%{_bindir}
+%{__install} %{SOURCE1} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/sockd
-install example/socks.conf ${RPM_BUILD_ROOT}%{_sysconfdir}
-install example/sockd.conf ${RPM_BUILD_ROOT}%{_sysconfdir}
-
-install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/sockd
-
-ln -sf %{_libdir}/libdsocks.so $RPM_BUILD_ROOT/%{_libdir}/libdsocks.so.0
+gzip -9nf BUGS CREDITS LICENSE NEWS README SUPPORT TODO
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
-
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post server
%postun server
if [ $1 = 0 ]; then
- /sbin/chkconfig --del sockd
+ /sbin/chkconfig --del sockd
fi
%files
%defattr(644,root,root,755)
-#files beginning with two capital letters are docs: BUGS, README.foo etc.
-%doc [A-Z][A-Z]*
-%{_libdir}/libsocks.so.0.1.0
-%{_libdir}/libsocks.so.0
-%{_libdir}/libdsocks.so.0.1.0
-%{_libdir}/libdsocks.so.0
+%doc *.gz
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/socks.conf
+%attr(755,root,root) %{_libdir}/lib*.so.*.*
%attr(755,root,root) %{_bindir}/socksify
%{_mandir}/man5/socks.conf.5*
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/socks.conf
%files server
%defattr(644,root,root,755)
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sockd.conf
+%attr(754,root,root) /etc/rc.d/init.d/sockd
%attr(755,root,root) %{_sbindir}/sockd
%{_mandir}/man8/sockd.8*
%{_mandir}/man5/sockd.conf.5*
-
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sockd.conf
-%config /etc/rc.d/init.d/sockd
-
%files devel
%defattr(644,root,root,755)
-%{_libdir}/libsocks.la
-%{_libdir}/libsocks.a
-%{_libdir}/libdsocks.la
-%{_libdir}/libsocks.so
-%{_libdir}/libdsocks.so
+%attr(755,root,root) %{_libdir}/lib*.so
+%attr(755,root,root) %{_libdir}/lib*.la
+%{_includedir}/*
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/lib*.a