%define pemdir %{_sysconfdir}/ssl/stunnel %define major 0 %define libname %mklibname %{name} %{major} %define libname_devel %mklibname %{name} -d %define libname_static_devel %mklibname %{name} -d -s Summary: Program that wraps normal socket connections with SSL/TLS Name: stunnel Version: 4.26 Release: %mkrel 2 License: GPL Group: System/Servers URL: http://www.stunnel.org/ Source0: http://www.stunnel.org/download/stunnel/src/%{name}-%{version}.tar.gz Source1: http://www.stunnel.org/download/stunnel/src/%{name}-%{version}.tar.gz.asc Source2: http://www.stunnel.org/download/stunnel/src/%{name}-%{version}.tar.gz.sha1 Patch0: stunnel-mdvconf.diff Patch1: stunnel-4.06-authpriv.patch Patch2: stunnel-soname.diff Patch3: stunnel-path_fix.diff Patch4: stunnel-4.24-lib64.patch BuildRequires: libtool BuildRequires: automake1.7 BuildRequires: autoconf2.5 BuildRequires: openssl >= 0.9.5 BuildRequires: openssl-devel >= 0.9.5 BuildRequires: tcp_wrappers-devel Requires: openssl >= 0.9.5a Requires: tcp_wrappers Requires: %{libname} >= %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description The stunnel program is designed to work as SSL encryption wrapper between remote clients and local (inetd-startable) or remote servers. The concept is that having non-SSL aware daemons running on your system you can easily set them up to communicate with clients over secure SSL channels. stunnel can be used to add SSL functionality to commonly used inetd daemons like POP-2, POP-3, and IMAP servers, to standalone daemons like NNTP, SMTP and HTTP, and in tunneling PPP over network sockets without changes to the source code. %package -n %{libname} Summary: Shared library for stunnel Group: System/Libraries %description -n %{libname} The stunnel program is designed to work as SSL encryption wrapper between remote clients and local (inetd-startable) or remote servers. The concept is that having non-SSL aware daemons running on your system you can easily set them up to communicate with clients over secure SSL channels. stunnel can be used to add SSL functionality to commonly used inetd daemons like POP-2, POP-3, and IMAP servers, to standalone daemons like NNTP, SMTP and HTTP, and in tunneling PPP over network sockets without changes to the source code. This package contains the shared library for stunnel. %package -n %{libname_devel} Summary: Development files for stunnel Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %{libname}-devel < %{version}-%{release} %description -n %{libname_devel} The stunnel program is designed to work as SSL encryption wrapper between remote clients and local (inetd-startable) or remote servers. The concept is that having non-SSL aware daemons running on your system you can easily set them up to communicate with clients over secure SSL channels. stunnel can be used to add SSL functionality to commonly used inetd daemons like POP-2, POP-3, and IMAP servers, to standalone daemons like NNTP, SMTP and HTTP, and in tunneling PPP over network sockets without changes to the source code. This package contains development files for stunnel. %package -n %{libname_static_devel} Summary: Static library for stunnel Group: Development/C Requires: %{libname_devel} = %{version}-%{release} Provides: lib%{name}-static-devel = %{version}-%{release} Provides: %{name}-static-devel = %{version}-%{release} %description -n %{libname_static_devel} The stunnel program is designed to work as SSL encryption wrapper between remote clients and local (inetd-startable) or remote servers. The concept is that having non-SSL aware daemons running on your system you can easily set them up to communicate with clients over secure SSL channels. stunnel can be used to add SSL functionality to commonly used inetd daemons like POP-2, POP-3, and IMAP servers, to standalone daemons like NNTP, SMTP and HTTP, and in tunneling PPP over network sockets without changes to the source code. This package contains the static library for stunnel. %prep %setup -q %patch0 -p1 -b .confdir %patch1 -p1 -b .authprv %patch2 -p1 -b .soname %patch3 -p0 -b .path_fix %patch4 -p1 -b .lib64 iconv -f iso-8859-1 -t utf-8 < doc/stunnel.fr.8 > doc/stunnel.fr.8_ mv doc/stunnel.fr.8_ doc/stunnel.fr.8 iconv -f iso-8859-2 -t utf-8 < doc/stunnel.pl.8 > doc/stunnel.pl.8_ mv doc/stunnel.pl.8_ doc/stunnel.pl.8 # XXX don't install /var/lib/stunnel perl -ni -e '/INSTALL.*-m 1770 -g nogroup.*stunnel$/ or print' tools/Makefile.am %{__perl} -pi -e 's/\r$//g' INSTALL.WCE %{_bindir}/autoreconf -i -v -f %build %configure2_5x \ --with-threads=fork \ --with-ssl=%{_prefix} \ --enable-static \ --enable-shared \ --localstatedir=%{_var} \ --with-tcp-wrappers \ --with-ipv6 %make pkglibdir=%{_libdir} %install rm -rf %{buildroot} mkdir -p %{buildroot}%{pemdir} \ %{buildroot}%{_var}/openssl/certs/trusted \ %{buildroot}%{_var}/run/stunnel # (oe) hack... don't generate the pem file touch %{buildroot}%{pemdir}/stunnel.pem %makeinstall docdir=`pwd`/doc-to-install pkglibdir=%{buildroot}%{_libdir} %{__mkdir_p} %{buildroot}%{_datadir}/%{name} %{__cp} -p tools/stunnel.cnf %{buildroot}%{_datadir}/%{name}/stunnel.cnf # Move the translated man pages to the right subdirectories, and strip off the # language suffixes. for lang in fr pl ; do mkdir -p %{buildroot}%{_mandir}/${lang}/man8 mv %{buildroot}%{_mandir}/man8/*.${lang}.8* %{buildroot}%{_mandir}/${lang}/man8/ rename ".${lang}" "" %{buildroot}%{_mandir}/${lang}/man8/* done # cleanup rm -f ./doc-to-install/INSTALL.W32 rm -f %{buildroot}%{pemdir}/* %post echo "To build a new pem, execute the following OpenSSL command:" echo " openssl req -new -x509 -days 365 -nodes \ " echo " -config %{_datadir}/%{name}/stunnel.cnf \ " echo " -out %{pemdir}/stunnel.pem -keyout %{pemdir}/stunnel.pem" echo "" %if %mdkversion < 200900 %post -n %{libname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{libname} -p /sbin/ldconfig %endif %clean rm -rf %{buildroot} %files %defattr(-,root,root,0755) %doc doc-to-install/* %{_bindir}/stunnel %{_bindir}/stunnel3 %{_datadir}/%{name}/ %dir %{pemdir} %dir %{_var}/run/stunnel %dir %{_var}/openssl/certs/trusted %{_mandir}/man8/stunnel.8.* %lang(fr) %{_mandir}/fr/man8/stunnel.8* %lang(pl) %{_mandir}/pl/man8/stunnel.8* %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.%{major}* %files -n %{libname_devel} %defattr(-,root,root) %{_libdir}/*.so %{_libdir}/*.la %files -n %{libname_static_devel} %{_libdir}/*.a %changelog * Wed Dec 17 2008 Oden Eriksson <oeriksson@mandriva.com> 4.26-2mdv2009.1 + Revision: 315259 - rediffed fuzzy patches * Sun Sep 21 2008 Oden Eriksson <oeriksson@mandriva.com> 4.26-1mdv2009.0 + Revision: 286323 - 4.26 (Major bugfixes) - rediffed P3 - drop upstream implemented patches * Thu Sep 11 2008 Oden Eriksson <oeriksson@mandriva.com> 4.25-4mdv2009.0 + Revision: 283757 - fix #31837 (Incorrect pid file location in sample init script) * Tue Sep 09 2008 Oden Eriksson <oeriksson@mandriva.com> 4.25-3mdv2009.0 + Revision: 283080 - fix #43685 (stunnel opens multiple times and killing the pid swollows the cpu) * Tue Sep 09 2008 Oden Eriksson <oeriksson@mandriva.com> 4.25-2mdv2009.0 + Revision: 283072 - fix deps - sync with fedora * Fri Sep 05 2008 Oden Eriksson <oeriksson@mandriva.com> 4.25-1mdv2009.0 + Revision: 281121 - 4.25 * Thu Aug 07 2008 Thierry Vignaud <tvignaud@mandriva.com> 4.24-3mdv2009.0 + Revision: 265742 - rebuild early 2009.0 package (before pixel changes) + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Mon May 19 2008 David Walluck <walluck@mandriva.org> 4.24-2mdv2009.0 + Revision: 209191 - move stunnel.cnf out of %%doc * Mon May 19 2008 David Walluck <walluck@mandriva.org> 4.24-1mdv2009.0 + Revision: 209138 - add stunnel-4.24-lib64.patch - 4.24 - rediff lib64 patch - update mdvconf patch + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Sat Nov 10 2007 David Walluck <walluck@mandriva.org> 4.21-2mdv2008.1 + Revision: 107380 - add 4.21 sources - call %%{make} normally - 4.21 - new lib policy - split out static lib - fix eol in INSTALL.WCE - set pkglibdir to %%{_libdir} - bins are now installed into %%{_bindir} and not %%{_sbindir} (by default) * Mon Feb 05 2007 Oden Eriksson <oeriksson@mandriva.com> 4.20-1mdv2007.0 + Revision: 116207 - 4.20 - drop obsolete and unmaintained patches - fix the soname loading in client.c - rediffed some patches - synced a bit with fedora * Tue Dec 12 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 4.15-2mdv2007.1 + Revision: 95732 - fix build - lib64 fixes - fix configure script - Import stunnel * Thu Jun 08 2006 Per Ãyvind Karlsen <pkarlsen@mandriva.com> 4.15-1mdv2007.0 - 4.15 - regenerate P0 * Sun Nov 13 2005 Oden Eriksson <oeriksson@mandriva.com> 4.11-2mdk - rebuilt against openssl-0.9.8a * Wed Jul 13 2005 Oden Eriksson <oeriksson@mandriva.com> 4.11-1mdk - 4.11 (Major bugfixes) - rediff P0, merged pidfile location into P0 * Mon Apr 25 2005 Oden Eriksson <oeriksson@mandriva.com> 4.10-1mdk - 4.10 * Sun Apr 17 2005 Oden Eriksson <oeriksson@mandriva.com> 4.09-1mdk - 4.09 - rediffed P0 - use the %%mkrel macro - fix requires-on-release * Mon Feb 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.08-1mdk - 4.08 * Mon Jan 03 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.07-1mdk - 4.07 * Fri Dec 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.06-3mdk - revert latest "lib64 fixes" * Mon Dec 27 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.06-2mdk - added P4 as an --with distcache rpmbuild switch (disabled per default) - make it rpmbuildupdate aware - misc spec file fixes * Mon Dec 27 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.06-1mdk - 4.06 - rediffed P0 & P1 - fix soname (P2) and do libifictions - automake1.7 - fix default pidfile location (P3) - enable ipv6 - misc spec file fixes * Tue Aug 10 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.05-1mdk - Release 4.05. - Use automake1.4.