[packages/dante] - added link patch (no unnecessary linking with -lnsl) - BR: libtool heimdal-devel pam-devel and (

qboosh qboosh at pld-linux.org
Tue Feb 5 15:54:00 CET 2013


commit 58414cf8254164aa3241b55e532fe6a8d61df97c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Feb 5 15:55:05 2013 +0100

    - added link patch (no unnecessary linking with -lnsl)
    - BR: libtool heimdal-devel pam-devel
      and (no direct linking, but features enabled conditionally for): cyrus-sasl-devel openldap-devel
    - added try-restart action to init script

 dante-link.patch | 15 +++++++++++++++
 dante.spec       | 52 +++++++++++++++++++++++++++++++++-------------------
 sockd.init       | 48 +++++++++++++++++++++++++++++++++++-------------
 3 files changed, 83 insertions(+), 32 deletions(-)
---
diff --git a/dante.spec b/dante.spec
index a1f3e23..e568c88 100644
--- a/dante.spec
+++ b/dante.spec
@@ -1,3 +1,6 @@
+# TODO:
+# - miniupnp ?
+# - examine ldap and sasl support (deps are pulled into *.la, no direct linking anywhere?)
 Summary:	A free Socks v4/v5 client implementation
 Summary(pl.UTF-8):	Darmowa implementacja klienta Socks v4/5
 Name:		dante
@@ -9,10 +12,16 @@ Source0:	ftp://ftp.inet.no/pub/socks/%{name}-%{version}.tar.gz
 # Source0-md5:	250c6456cd3fefa17f07fa80c9ccf6bd
 Source1:	sockd.init
 Patch0:		%{name}-am.patch
+Patch1:		%{name}-link.patch
 URL:		http://www.inet.no/dante/
-BuildRequires:	autoconf
+BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
+BuildRequires:	cyrus-sasl-devel
+BuildRequires:	heimdal-devel
+BuildRequires:	libtool
 BuildRequires:	libwrap-devel
+BuildRequires:	openldap-devel
+BuildRequires:	pam-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -52,33 +61,38 @@ sockd jest częścią pakietu proxy Dante. Za pośrednictwem serwera
 klienci mogą łączyć się z serwerami w sieci.
 
 %package devel
-Summary:	Development libraries for socks
-Summary(pl.UTF-8):	Biblioteki developerskie dla socks
+Summary:	Development files for socks library
+Summary(pl.UTF-8):	Pliki programistyczne biblioteki socks
 Group:		Networking/Daemons
 Requires:	%{name} = %{version}-%{release}
+Requires:	cyrus-sasl-devel
+Requires:	heimdal-devel
+Requires:	openldap-devel
+Requires:	pam-devel
 
 %description devel
-Additional libraries required to compile programs that use socks.
+Development files required to compile programs that use socks.
 
 %description devel -l pl.UTF-8
-Dodatkowe biblioteki wymagane do rozwoju programów korzystających z
+Pliki programistyczne wymagane do rozwoju programów korzystających z
 socks.
 
 %package static
-Summary:	Static libraries for socks
-Summary(pl.UTF-8):	Statyczne biblioteki socks
+Summary:	Static socks library
+Summary(pl.UTF-8):	Statyczna biblioteka socks
 Group:		Networking/Daemons
 Requires:	%{name}-devel = %{version}-%{release}
 
 %description static
-Static libraries for socks.
+Static socks library.
 
 %description static -l pl.UTF-8
-Statyczne biblioteki socks.
+Statyczna biblioteka socks.
 
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -99,9 +113,9 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d}
 %{__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
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sockd
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -127,10 +141,10 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc BUGS CREDITS LICENSE NEWS README SUPPORT
+%doc BUGS CREDITS LICENSE NEWS README SUPPORT UPGRADE
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/socks.conf
-%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/lib*.so.0
+%attr(755,root,root) %{_libdir}/libsocks.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsocks.so.0
 %attr(755,root,root) %{_libdir}/libdsocks.so
 %attr(755,root,root) %{_bindir}/socksify
 %{_mandir}/man5/socks.conf.5*
@@ -146,11 +160,11 @@ fi
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so
-%exclude %{_libdir}/libdsocks.so
-%{_libdir}/lib*.la
-%{_includedir}/*
+%attr(755,root,root) %{_libdir}/libsocks.so
+%{_libdir}/libsocks.la
+%{_libdir}/libdsocks.la
+%{_includedir}/socks.h
 
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libsocks.a
diff --git a/dante-link.patch b/dante-link.patch
new file mode 100644
index 0000000..f1af069
--- /dev/null
+++ b/dante-link.patch
@@ -0,0 +1,15 @@
+--- dante-1.3.2/configure.ac.orig	2013-02-04 21:35:07.271902241 +0100
++++ dante-1.3.2/configure.ac	2013-02-05 15:23:11.200566535 +0100
+@@ -878,12 +878,6 @@
+ dnl normal library testing doesn't work for libwrap (doesn't link
+ dnl without allow/deny_severity)
+ if test "x${ac_cv_header_tcpd_h}" = "xyes"; then
+-    case $host in
+-	*-*-linux-*)
+-	    #XXX needed on atleast redhat
+-	    AC_SEARCH_LIBS(yp_get_default_domain, nsl)
+-	;;
+-    esac
+     oLIBS=$LIBS
+     AC_MSG_CHECKING([for libwrap])
+     if test x$no_libwrap = xt; then
diff --git a/sockd.init b/sockd.init
index b4e89d5..df5d554 100644
--- a/sockd.init
+++ b/sockd.init
@@ -29,10 +29,7 @@ else
 	exit 0
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
 	# Check if the service is already running?
 	if [ ! -f /var/lock/subsys/sockd ]; then
 		msg_starting sockd
@@ -42,9 +39,9 @@ case "$1" in
 	else
 		msg_already_running sockd
 	fi
-	;;
-  stop)
-	# Stop daemons.
+}
+
+stop() {
 	if [ -f /var/lock/subsys/sockd ]; then
 		msg_stopping sockd
 		killproc sockd
@@ -52,18 +49,43 @@ case "$1" in
 	else
 		msg_not_running sockd
 	fi
+}
+
+condrestart() {
+	if [ ! -f /var/lock/subsys/sockd ]; then
+		msg_not_running sockd
+		RETVAL=$1
+		return
+	fi
+	stop
+	start
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  restart)
+	stop
+	start
+	;;
+  try-restart)
+	condrestart 0
+	;;
+  force-reload)
+	condrestart 7
 	;;
   status)
 	status sockd
 	exit $?
 	;;
-  restart|force-reload)
-	$0 stop
-	$0 start
-	exit $?
-	;;
   *)
-	msg_usage "$0 {start|stop|restart|force-reload|status}"
+	msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
 	exit 3
 esac
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dante.git/commitdiff/58414cf8254164aa3241b55e532fe6a8d61df97c



More information about the pld-cvs-commit mailing list