]> git.pld-linux.org Git - packages/stunnel.git/blobdiff - stunnel.spec
- up to 5.05
[packages/stunnel.git] / stunnel.spec
index 5e1ecf43c9b99f2ce11f6e69f12550068f2b321d..a70b36b8ade6f7c8de6650dc9f4846a7909536ed 100644 (file)
@@ -1,27 +1,38 @@
-# TODO:
-# - fix /var/run/stunnel ownership (nobody must NOT own any files!)
 Summary:       Universal SSL tunnel
-Summary(pl):   Uniwersalne narzêdzie do bezpiecznego tunelowania
+Summary(pl.UTF-8):     Uniwersalne narzędzie do bezpiecznego tunelowania
 Name:          stunnel
-Version:       4.04
-Release:       0.9
-License:       GPL v2
+Version:       5.05
+Release:       1
+License:       GPL v2+ with OpenSSL exception
 Group:         Networking/Daemons
-Source0:       ftp://stunnel.mirt.net/stunnel/%{name}-%{version}.tar.gz
-# Source0-md5: 2fcdf0311a0ab8a3223293c706a84e97
+Source0:       ftp://ftp.stunnel.org/stunnel/%{name}-%{version}.tar.gz
+# Source0-md5: 39e2e678eb5572c9d86ae391db5da30b
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
-Patch0:                %{name}-gethostbyname_is_in_libc_aka_no_libnsl.patch
-Patch1:                %{name}-authpriv.patch
-Patch2:                %{name}-ac_fixes.patch
-Patch3:                %{name}-am.patch
-Patch4:                %{name}-getgrnam.patch
+Source3:       %{name}.inet
+Source4:       %{name}.tmpfiles
+Patch0:                %{name}-authpriv.patch
+Patch1:                %{name}-ac_fixes.patch
+Patch2:                %{name}-am.patch
+Patch3:                %{name}-libwrap_srv_name_log.patch
+Patch4:                %{name}-config.patch
 URL:           http://www.stunnel.org/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.50
 BuildRequires: automake
-BuildRequires: libtool
-BuildRequires: openssl-devel >= 0.9.7
-BuildRequires: openssl-tools >= 0.9.7
+BuildRequires: libtool >= 2:2.0
+BuildRequires: libwrap-devel
+BuildRequires: openssl-devel >= 0.9.7d
+BuildRequires: openssl-tools >= 0.9.7d
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(postun):      /sbin/ldconfig
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Provides:      group(stunnel)
+Provides:      user(stunnel)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -33,10 +44,39 @@ secure SSL channel. stunnel can be used to add SSL functionality to
 commonly used inetd daemons like POP-2, POP-3 and IMAP servers without
 any changes in the programs' code.
 
-%description -l pl
-Stunnel umo¿liwia stawianie silnie kodowanych tuneli pomiêdzy serwerem
-a komputerem klienta. Przy jego u¿yciu mo¿na ³atwo zrealizowaæ us³ugi
-pop3s lub https.
+%description -l pl.UTF-8
+Stunnel umożliwia stawianie silnie kodowanych tuneli pomiędzy serwerem
+a komputerem klienta. Przy jego użyciu można łatwo zrealizować usługi
+pop3s lub HTTPS.
+
+%package standalone
+Summary:       stunnel acts as standalone server
+Summary(pl.UTF-8):     stunnel działający jako samodzielny serwer
+Group:         Networking/Daemons
+Requires(post,preun):  /sbin/chkconfig
+Requires:      %{name} = %{version}-%{release}
+Requires:      rc-scripts
+Obsoletes:     stunnel-inetd
+
+%description standalone
+stunnel acts as standalone server.
+
+%description standalone -l pl.UTF-8
+stunnel działający jako samodzielny serwer.
+
+%package inetd
+Summary:       stunnel acts as inetd service
+Summary(pl.UTF-8):     stunnel działający jako usługa inetd
+Group:         Networking/Daemons
+Requires:      %{name} = %{version}-%{release}
+Requires:      rc-inetd
+Obsoletes:     stunnel-standalone
+
+%description inetd
+stunnel acts as inetd service.
+
+%description inetd -l pl.UTF-8
+stunnel działający jako usługa inetd.
 
 %prep
 %setup -q
@@ -47,7 +87,6 @@ pop3s lub https.
 %patch4 -p1
 
 %build
-rm -f missing
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
@@ -57,34 +96,80 @@ rm -f missing
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_mandir}/pl/man8,%{_var}/run/stunnel}
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig/rc-inetd},%{_mandir}/{pl,fr}/man8,%{_var}/run/stunnel} \
+       $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-mv -f $RPM_BUILD_ROOT/%{_mandir}/man8/stunnel.pl.8* $RPM_BUILD_ROOT/%{_mandir}/pl/man8/
+mv -f $RPM_BUILD_ROOT%{_mandir}/man8/stunnel.fr.8 $RPM_BUILD_ROOT%{_mandir}/fr/man8/stunnel.8
+mv -f $RPM_BUILD_ROOT%{_mandir}/man8/stunnel.pl.8 $RPM_BUILD_ROOT%{_mandir}/pl/man8/stunnel.8
+mv -f $RPM_BUILD_ROOT%{_sysconfdir}/stunnel/stunnel.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/stunnel/stunnel.conf
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/stunnel
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/stunnel
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/stunnel
+install %{SOURCE4} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+
+rm -rf $RPM_BUILD_ROOT%{_libdir}/stunnel
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/stunnel/stunnel.pem
+rm -rf $RPM_BUILD_ROOT%{_docdir}/stunnel
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post   -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%pre
+%groupadd -g 130 stunnel
+%useradd -u 130 -d /var/run/stunnel -s /bin/false -c "stunnel User" -g stunnel stunnel
+
+%post  -p /sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+if [ "$1" = "0" ]; then
+       %userremove stunnel
+       %groupremove stunnel
+fi
+
+%post standalone
+/sbin/chkconfig --add stunnel
+%service stunnel restart "stunnel daemon"
+
+%preun standalone
+if [ "$1" = "0" ]; then
+       %service stunnel stop
+       /sbin/chkconfig --del stunnel
+fi
+
+%post inetd
+%service -q rc-inetd reload
+
+%postun inetd
+if [ "$1" = "0" ]; then
+       %service -q rc-inetd reload
+fi
 
 %files
 %defattr(644,root,root,755)
 # note: this COPYING contains general information not GPL text
-%doc AUTHORS BUGS COPYING CREDITS ChangeLog NEWS PORTS README TODO doc/en/* doc/stunnel.html
-%doc src/stunnel.exe  tools/{ca.*,importCA.*}
+%doc AUTHORS BUGS COPYING CREDITS ChangeLog NEWS PORTS README TODO doc/en/* doc/stunnel.html tools/{ca.*,importCA.*}
+%doc %lang(fr) doc/stunnel.fr.html
 %doc %lang(pl) doc/pl/* doc/stunnel.pl.html
-%dir /etc/stunnel
-%attr(755,root,root) /etc/rc.d/init.d/stunnel
-%attr(600,root,root) /etc/sysconfig/stunnel
-%attr(700,nobody,nobody) %{_var}/run/stunnel
-%config(noreplace) %verify(not size mtime md5) /etc/stunnel/*
-%attr(755,root,root) %{_sbindir}/*
-%attr(755,root,root) %{_libdir}/*
-%{_mandir}/man8/*
-%lang(pl) %{_mandir}/pl/man8/*
+%attr(755,root,root) %{_bindir}/stunnel
+%attr(755,root,root) %{_bindir}/stunnel3
+%dir %{_sysconfdir}/stunnel
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/stunnel/stunnel.conf
+%attr(750,stunnel,stunnel) %{_var}/run/stunnel
+/usr/lib/tmpfiles.d/%{name}.conf
+%{_mandir}/man8/stunnel.8*
+%lang(fr) %{_mandir}/fr/man8/stunnel.8*
+%lang(pl) %{_mandir}/pl/man8/stunnel.8*
+
+%files standalone
+%defattr(644,root,root,755)
+%attr(754,root,root) /etc/rc.d/init.d/stunnel
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stunnel
+
+%files inetd
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/stunnel
This page took 0.077186 seconds and 4 git commands to generate.