]> git.pld-linux.org Git - packages/dante.git/commitdiff
- added link patch (no unnecessary linking with -lnsl)
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 5 Feb 2013 14:55:05 +0000 (15:55 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 5 Feb 2013 14:55:05 +0000 (15:55 +0100)
- 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 [new file with mode: 0644]
dante.spec
sockd.init

diff --git a/dante-link.patch b/dante-link.patch
new file mode 100644 (file)
index 0000000..f1af069
--- /dev/null
@@ -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
index a1f3e23ed851f16e31326e97b8dd94e2261d9593..e568c88bccd45483e5453d095484dfe98455c66c 100644 (file)
@@ -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
index b4e89d57b75c9fee0b05078b0d1f9d4efc7cc2d9..df5d55444b6bacbf564c0fc78876f51d8aa85ba7 100644 (file)
@@ -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
 
This page took 0.222875 seconds and 4 git commands to generate.