File dante.spec of Package dante

#
# spec file for package dante (Version 1.1.19)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           dante
BuildRequires:  pam-devel
Summary:        A Free Socks v4 and v5 Client Implementation
Version:        1.1.19
Release:        135
License:        BSD 3-Clause
Url:            http://www.inet.no/dante/
Source:         ftp://ftp.inet.no/pub/socks/dante-%{version}.tar.bz2
Source1:        sockd.init
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Group:          Productivity/Networking/Security
# SuSE series: sec

%description
Dante is a free implementation of the following proxy protocols: socks
version 4, socks version 5 (rfc1928), and msproxy. It can be used as a
firewall between networks. It is being developed by Inferno Nettverk
A/S, a Norwegian consulting company. Commercial support is available.

This package contains the dynamic libraries required to make existing
applications become socks clients.



Authors:
--------
    For Inferno Nettverk A/S, Norway:
    Michael Shuldman <michaels@inet.no>: Design and implementation.
    Karl-Andre' Skevik <karls@inet.no>: Autoconf and porting.

%package -n dante-server
License:        BSD 3-Clause
Provides:       dantesrv
Obsoletes:      dantesrv
Summary:        A Free Socks v4/v5 Server Implementation
Group:          Productivity/Networking/Other
Requires:       dante
PreReq:         %insserv_prereq %fillup_prereq

%description -n dante-server
This package contains the socks proxy daemon and its documentation. The
sockd is the server part of the Dante socks proxy package and allows
socks clients to connect through it to the network.



Authors:
--------
    For Inferno Nettverk A/S, Norway:
    Michael Shuldman <michaels@inet.no>: Design and implementation.
    Karl-Andre' Skevik <karls@inet.no>: Autoconf and porting.

%package -n dante-devel
License:        BSD 3-Clause
Provides:       dantedev
Obsoletes:      dantedev
Summary:        Include Files and Libraries mandatory for Development.
Group:          Development/Libraries/C and C++
Requires:       dante

%description -n dante-devel
This package contains all necessary include files and libraries needed
to develop applications that require these.



Authors:
--------
    For Inferno Nettverk A/S, Norway:
    Michael Shuldman <michaels@inet.no>: Design and implementation.
    Karl-Andre' Skevik <karls@inet.no>: Autoconf and porting.

%prep
%setup
%{?suse_update_config:%{suse_update_config -l -f}}

%build
DANTELIBC=`find /%{_lib}/ -maxdepth 1 -iname "libc.so.*"`
echo >> acinclude.m4
autoreconf --force --install
CFLAGS="${RPM_OPT_FLAGS}" 		\
%configure	--disable-static --with-pic --enable-shared --with-libc=$DANTELIBC
%{__make} %{?jobs:-j%jobs}

%install
if [ -n "$RPM_BUILD_ROOT" ] ; then
   [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
fi
make install DESTDIR=${RPM_BUILD_ROOT}
#set library as executable - prevent ldd from complaining
chmod +x ${RPM_BUILD_ROOT}%{_libdir}/*.so.*.*
install -d 	${RPM_BUILD_ROOT}/etc/init.d \
	   	${RPM_BUILD_ROOT}%{prefix}/bin \
	   	${RPM_BUILD_ROOT}%{prefix}/usr/sbin
install -m 644 example/socks.conf ${RPM_BUILD_ROOT}/etc
install -m 644 example/sockd.conf ${RPM_BUILD_ROOT}/etc
install -m 755 %{S:1}	 	${RPM_BUILD_ROOT}/etc/init.d/sockd
ln -sf          ../../etc/init.d/sockd	${RPM_BUILD_ROOT}/usr/sbin/rcsockd
#
# fix bug #23141
#
mv ${RPM_BUILD_ROOT}/usr/bin/socksify ${RPM_BUILD_ROOT}/usr/bin/socksify.old
#
%ifarch alpha
sed -e 's|libdl.so|/lib/libdl.so.2.1|' < ${RPM_BUILD_ROOT}/usr/bin/socksify.old > ${RPM_BUILD_ROOT}/usr/bin/socksify
%else
sed -e 's|libdl.so|/%{_lib}/libdl.so.2|' < ${RPM_BUILD_ROOT}/usr/bin/socksify.old > ${RPM_BUILD_ROOT}/usr/bin/socksify
%endif
#
rm ${RPM_BUILD_ROOT}/usr/bin/socksify.old
%{__rm} -f %{buildroot}%{_libdir}/*.la

%clean
if [ -n "$RPM_BUILD_ROOT" ] ; then
   [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
fi

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post -n dante-server
%{fillup_and_insserv sockd}

%postun -n dante-server
%{insserv_cleanup}

%files
%defattr(-,root,root)
#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}/libsocks.so
%{_libdir}/libdsocks.so.0.1.0
%{_libdir}/libdsocks.so.0
%{_libdir}/libdsocks.so
%attr(755,root,root) %{_bindir}/socksify
%doc %{_mandir}/man5/socks.conf.5.gz
%config(noreplace) /etc/socks.conf

%files -n dante-server
%defattr(-,root,root)
#doc [A-Z][A-Z]*
%doc %{_mandir}/man8/sockd.8.gz
%doc %{_mandir}/man5/sockd.conf.5.gz
%attr(755,root,root) %{_sbindir}/sockd
%config(noreplace) /etc/sockd.conf
%attr(755,root,root) /etc/init.d/sockd
/usr/sbin/rcsockd

%files -n dante-devel
%defattr(-,root,root)
#doc [A-Z][A-Z]*
%{_includedir}/*.h

%changelog
* Wed Apr 01 2009 crrodriguez@suse.de
- remove static libraries and "la" files
* Thu Aug 28 2008 ro@suse.de
- fix init-script: add $network to Required-Stop
* Wed Jan 30 2008 ro@suse.de
- don't package same docs in all three subpackages
* Tue Aug 29 2006 ro@suse.de
- m4 gets picky about files ending with comments,
  add a blank line to acinclude.m4
* Mon Mar 13 2006 mge@suse.de
- update to 1.1.19
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 16 2006 mge@suse.de
- update to 1.1.18
* Thu Jul 01 2004 mge@suse.de
- fixes #42644 - /usr/bin/socksify uses /lib/libdl.so.2
* Mon Mar 22 2004 mge@suse.de
- corrected wrong file attributes introduced with "%%defattr"
  fixes bug #36333: "dante packaging error"
* Fri Jan 16 2004 kukuk@suse.de
- Add pam-devel to neededforbuild
* Sat Jan 10 2004 adrian@suse.de
- add %%defattr and %%run_ldconfig
* Thu Aug 21 2003 ro@suse.de
- fix build for beta distros
* Mon Jul 28 2003 mge@suse.de
- update to 1.1.14
* Mon Jul 28 2003 mge@suse.de
- fix bug #23141 error trying to socksify ssh
* Tue May 27 2003 ro@suse.de
- add libdsocks.a to devel file list
* Mon Aug 19 2002 mmj@suse.de
- Correct PreReq
* Fri Aug 16 2002 mge@suse.de
- fix building on 64bit
* Thu Aug 15 2002 mge@suse.de
- update to 1.1.13
* Wed Jul 10 2002 olh@suse.de
- hack ltconfig for ppc64 to build shared libs
* Mon Apr 29 2002 sf@suse.de
- added %%{_libdir} to build on bilib achrs
- added %%{suse_update_config} to build on x86_64
* Tue Feb 19 2002 ro@suse.de
- fixed init script (exit fixed, force-reload-added) (#13325)
* Mon Jan 14 2002 ro@suse.de
- removed START_SOCKD
* Wed Oct 31 2001 bjacke@suse.de
- make /etc/sock{s,d} (noreplace)
- use libdir macro
* Sun Aug 26 2001 mge@suse.de
- updated to 1.1.10: let client-rules have their own global
  methodline, "clientmethod", default value set to "none".
  The global "method" is only used for socks-rules now.
- added include files			  (bug #7745)
- fixed /etc/init.d/sockd status-handling (bug #9415)
* Fri Mar 30 2001 mge@suse.de
- update to 1.1.9
* Mon Dec 04 2000 mge@suse.de
- update to 1.1.6, new /etc/init.d handling, long RPM names
* Wed Nov 22 2000 uli@suse.de
- fixed to build
* Thu Jul 13 2000 mge@suse.de
- added symlinks to /etc/rc.d/rc2.d /etc/rc.d/rc3.d
* Fri Jul 07 2000 mge@suse.de
- updated sockd.init
* Wed Jul 05 2000 mge@suse.de
- initial SuSE package
openSUSE Build Service is sponsored by