]> git.pld-linux.org Git - packages/courier-sox.git/commitdiff
- updated to 0.12 auto/th/courier-sox-0.12-1
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 20 Mar 2018 18:12:31 +0000 (19:12 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 20 Mar 2018 18:12:31 +0000 (19:12 +0100)
- more PLDification in init patch

courier-sox-init.patch
courier-sox.spec

index d5c4305c692a42f464fec81910863d5941d3b622..e3f48df2c6bad75f6b77ec0ba9c2800bc1755743 100644 (file)
-diff -Nur old/courier-sox.sysvinit.in new/courier-sox.sysvinit.in
---- old/courier-sox.sysvinit.in        2004-12-05 02:24:29.000000000 +0000
-+++ new/courier-sox.sysvinit.in        2005-04-16 19:09:43.000000000 +0000
-@@ -5,6 +5,9 @@
- #
- #
+--- courier-sox-0.12/courier-sox.sysvinit.in.orig      2013-08-25 20:57:39.000000000 +0200
++++ courier-sox-0.12/courier-sox.sysvinit.in   2018-03-20 18:43:13.183970169 +0100
+@@ -14,31 +14,92 @@
+ datarootdir="@datarootdir@"
+ datadir="@datadir@"
  
+-case "$1" in
+-start)
+-        cd /
+-        # Start daemons.
+-        touch /var/lock/subsys/courier-sox
 +# Source function library
 +. /etc/rc.d/init.d/functions
 +
- prefix="@prefix@"
- exec_prefix="@exec_prefix@"
- sysconfdir="@sysconfdir@"
-@@ -29,15 +32,23 @@
++# Get network config
++. /etc/sysconfig/network
++
++# Check that networking is up.
++if is_yes "${NETWORKING}"; then
++      if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
++              msg_network_down "Courier Socks"
++              exit 1
++      fi
++else
++      exit 0
++fi
++
++# Get service config
++[ -f /etc/sysconfig/courier-sox ] && . /etc/sysconfig/courier-sox
++
++start() {
++      if [ -f /var/lock/subsys/courier-sox ]; then
++              msg_already_running "Courier Socks"
++              return
++      fi
++
++      cd /
++      $sbindir/sockd start && ok || fail
++      RETVAL=$?
++      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-sox
++}
  
-       $sbindir/sockd stop
-       echo "sockd"
+-        echo -n "Starting the Courier Socks server: "
++stop() {
++      if [ ! -f /var/lock/subsys/courier-sox ]; then
++              msg_not_running "Courier Socks"
++              return
++      fi
++      msg_stopping "Courier Socks"
++      $sbindir/sockd stop && ok || fail
 +      rm -f /var/lock/subsys/courier-sox
++}
+-      $sbindir/sockd start
+-      echo "sockd"
++reload() {
++      if [ ! -f /var/lock/subsys/courier-sox ]; then
++              msg_not_running "Courier Socks"
++              RETVAL=7
++              return
++      fi
++
++      msg_reloading "Courier Socks"
++      $sbindir/sockd restart && ok || fail
++      RETVAL=$?
++}
++
++condrestart() {
++      if [ ! -f /var/lock/subsys/courier-sox ]; then
++              msg_not_running "Courier Socks"
++              RETVAL=$1
++              return
++      fi
++      stop
++      start
++}
++
++case "$1" in
++start)
++      start
+         ;;
+ stop)
+-        echo -n "Stopping the Courier Socks server: "
+-
+-      $sbindir/sockd stop
+-      echo "sockd"
++      stop
          ;;
  restart)
-       $0 stop
-       $0 start
+-      $0 stop
+-      $0 start
++      stop
++      start
          ;;
 -reload)
+-        echo -n "Reloading the Courier Socks server: "
+-      $sbindir/sockd restart
+-      echo "sockd"
++try-restart)
++      condrestart 0
++      ;;
 +reload|force-reload)
-         echo -n "Reloading the Courier Socks server: "
-       $sbindir/sockd restart
-       echo "sockd"
++        reload
          ;;
 +status)
 +        status sockd
-+      exit $?
++      RETVAL=$?
 +      ;;
 +*)
-+        msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
++        msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
 +      exit 3
  esac
- exit 0
+-exit 0
++exit $RETVAL
index 5e7aa2e8e78d1d0df9cb3f1074a2bc9067593538..74e81acda8c446bc3bab66c3e463e871c6756806 100644 (file)
@@ -1,25 +1,28 @@
-Summary:       Courier Socks 5 client library
+#
+# Conditional build:
+%bcond_without static_libs     # static libraries
+%bcond_without tests           # "make check"
+
+%include       /usr/lib/rpm/macros.perl
+Summary:       Courier Socks 5 client libraries
 Summary(pl.UTF-8):     Biblioteki klienckie Socks 5
 Name:          courier-sox
-Version:       0.10
+Version:       0.12
 Release:       1
-License:       GPL
-Group:         Networking/Daemons
+License:       GPL v3 with OpenSSL exception
+Group:         Networking/Utilities
 Source0:       http://downloads.sourceforge.net/courier/%{name}-%{version}.tar.bz2
-# Source0-md5: 7526b08d7eb6a797dad9b299934a09c3
+# Source0-md5: c5f3778d9c5d7136b707b5f8ebb80515
 Patch0:                %{name}-init.patch
-URL:           http://www.courier-mta.org
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: courier-authlib-devel
+URL:           http://www.courier-mta.org/
+BuildRequires: courier-authlib-devel >= 0.56.20050702
 BuildRequires: gdbm-devel
-BuildRequires: libltdl-devel
-BuildRequires: libtool
+BuildRequires: libltdl-devel >= 2:2.0
+BuildRequires: perl-base
+BuildRequires: rpm-perlprov
 BuildRequires: rpmbuild(macros) >= 1.268
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _libexecdir     %{_libdir}/courier-sox
-
 %description
 This is a generic Socks 5 client support library.
 
@@ -40,21 +43,6 @@ Socks 5 proxies.
 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji używających
 proxy Socks 5.
 
-%package server
-Summary:       Socks 5 server
-Summary(pl.UTF-8):     Serwer socks 5
-Group:         Networking/Utilities
-Requires(post,preun):  /sbin/chkconfig
-Requires:      %{name} = %{version}-%{release}
-
-%description server
-This package contains the Courier Socks 5 server. Install this package
-if you want to run a Socks 5 server.
-
-%description server -l pl.UTF-8
-Ten pakiet zawiera serwer couriera socks 5. Jeżeli chcesz uruchamiać
-serwer socks5, zainstaluj ten pakiet.
-
 %package static
 Summary:       Socks 5 client static libraries
 Summary(pl.UTF-8):     Biblioteki statyczne klienta socks 5
@@ -69,24 +57,34 @@ use Socks 5 proxies.
 Ten pakiet zawiera biblioteki statyczne do tworzenia aplikacji
 używających proxy Socks 5.
 
+%package server
+Summary:       Socks 5 server
+Summary(pl.UTF-8):     Serwer socks 5
+Group:         Networking/Daemons
+Requires(post,preun):  /sbin/chkconfig
+Requires:      %{name} = %{version}-%{release}
+Requires:      courier-authlib-libs >= 0.56.20050702
+
+%description server
+This package contains the Courier Socks 5 server.
+
+%description server -l pl.UTF-8
+Ten pakiet zawiera serwer Courier Socks 5.
+
 %prep
 %setup -q
 %patch0 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-
-ln -sf ../config.sub libltdl/config.sub
-
 %configure \
-       --libexecdir=%{_libexecdir}
+       --libexecdir=%{_libexecdir}/courier-sox \
+       %{!?with_static_libs:--disable-static}
 
 %{__make}
+
+%if %{with tests}
 %{__make} check
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -94,8 +92,7 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
-install courier-sox.sysvinit $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-sox
+install -D courier-sox.sysvinit $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-sox
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -116,28 +113,38 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README *.html
-%attr(755,root,root) %{_bindir}/*
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
-%{_libdir}/lib*.la
-%{_mandir}/man1/socksify*
-%{_mandir}/man3/socks*
-%{_mandir}/man5/*
-%{_mandir}/man8/mkbl4*
-%{_sysconfdir}/socksrc
+%attr(755,root,root) %{_bindir}/mkbl4
+%attr(755,root,root) %{_bindir}/socksify
+%attr(755,root,root) %{_libdir}/libsocks.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsocks.so.0
+%attr(755,root,root) %{_libdir}/libsockswrap.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsockswrap.so.0
+%{_mandir}/man1/socksify.1*
+%{_mandir}/man5/socksrc.5*
+%{_mandir}/man8/mkbl4.8*
+%dir %{_sysconfdir}/socksrc
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/socksrc/system
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_includedir}/*
+%attr(755,root,root) %{_libdir}/libsocks.so
+%attr(755,root,root) %{_libdir}/libsockswrap.so
+%{_libdir}/libsocks.la
+%{_libdir}/libsockswrap.la
+%{_includedir}/socks.h
+%{_mandir}/man3/socks.3*
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libsocks.a
+%{_libdir}/libsockswrap.a
+%endif
 
 %files server
 %defattr(644,root,root,755)
 %attr(754,root,root) /etc/rc.d/init.d/courier-sox
-%{_mandir}/man1/sockd*
 %attr(755,root,root) %{_sbindir}/sockd
-%dir %{_libexecdir}
-%attr(755,root,root) %{_libexecdir}/sockd
-
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%dir %{_libexecdir}/courier-sox
+%attr(755,root,root) %{_libexecdir}/courier-sox/sockd
+%{_mandir}/man1/sockd.1*
This page took 0.405251 seconds and 4 git commands to generate.