Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 472a0de71fecd93df62e22b7763f0577 > files > 8

stunnel-4.07-1mdk.src.rpm

%define name stunnel
%define version 4.07
%define release 1mdk
%define pemdir	%{_sysconfdir}/ssl/stunnel

%define build_distcache 0

# commandline overrides:
# rpm -ba|--rebuild --with 'xxx'
%{?_with_distcache: %{expand: %%define build_distcache 1}}

%if %{build_distcache}
%define build_distcache 1
%endif

%define	major	0
%define libname	%mklibname %{name} %{major}

Summary:	Program that wraps normal socket connections with SSL/TLS
Name:		%{name}
Version:	%{version}
Release:	%{release}
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
Patch0:		%{name}-4.06-confdir.patch.bz2
Patch1:		%{name}-4.06-authpriv.patch.bz2
Patch2:		stunnel-4.06-soname.diff.bz2
Patch3:		stunnel-4.06-pidfile_location.diff.bz2
# (oe): P100 originates from:
# http://www.stunnel.org/patches/patches/distcache_geoff.patch
Patch100:	stunnel-4.06-distcache.diff.bz2
BuildRequires:	automake1.7
BuildRequires:	autoconf2.5
BuildRequires:	openssl >= 0.9.5
BuildRequires:	openssl-devel >= 0.9.5
BuildRequires:  tcp_wrappers-devel
%if %{build_distcache}
BuildRequires:	distcache-devel
%endif
Requires:	openssl >= 0.9.5a
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}

%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.

You can also rebuild %{name} with distcache support. The following are
valid build options.

(ie. use with rpm --rebuild):

    --with distcache	Build with distcache support (disabled per default)

More information about distcache here: http://distcache.sourceforge.net/

%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

%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.

%prep

%setup -q
%patch0 -p1 -b .confdir
%patch1 -p1 -b .authprv
%patch2 -p1 -b .soname
%patch3 -p0 -b .pidfile_location

%if %{build_distcache}
%patch100 -p1 -b .distcache
%endif

%build
export WANT_AUTOCONF_2_5=1
libtoolize --copy --force && aclocal-1.7 && automake-1.7 -a && autoconf

%configure2_5x \
    --with-ssl=%{_prefix} \
    --enable-static \
    --enable-shared \
%if !%{build_distcache}
    --without-distcache --disable-distcache \
%endif
    --localstatedir=%{_var} \
    --with-tcp-wrappers \
    --with-ipv6
echo -e "\n\n\n\n\n\n" | make


%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

mkdir -p %{buildroot}%{pemdir} \
	%{buildroot}%{_var}/openssl/certs/trusted \
	%{buildroot}%{_var}/run/stunnel

%makeinstall docdir=`pwd`/doc-to-install

# cleanup
rm -f %{buildroot}%{_mandir}/man8/*.pl.8* \
      %{buildroot}%{_mandir}/man8/*fr.8* ./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 %{_docdir}/%{name}-%{version}/stunnel.cnf \ "
echo "    -out %{pemdir}/stunnel.pem -keyout %{pemdir}/stunnel.pem"
echo ""

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root,0755)
%doc doc-to-install/* tools/stunnel.cnf
%{_sbindir}/stunnel
%{_sbindir}/stunnel3
%{_mandir}/man8/stunnel.8.*
%dir %{pemdir}
%dir %{_var}/run/stunnel
%dir %{_var}/openssl/certs/trusted

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/*.la

%changelog
* Mon Jan  3 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

* Mon Aug 09 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.05-1mdk
- Release 4.05.
- Use automake1.4.

* Fri Aug 22 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.04-4mdk
- Fix bug #4836.

* Fri Jul 25 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 4.04-3mdk
- rebuild

* Tue Jul 01 2003 Stefan van der Eijk <stefan@eijk.nu> 4.04-2mdk
- BuildRequires
- quiet setup

* Fri Feb 14 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 4.04-1mdk
- Updated to release 4.04.
- Merged RedHat authpriv Patch.

* Mon Aug 19 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.22-2mdk
- Fixed PEM path to %{pemdir}.

* Tue Dec 25 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 3.22-1mdk
- Use pristine source aka tgz.
- Include the asc file with it.

* Thu Nov 22 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 3.21c-1mdk
- new release

* Fri Nov 02 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 3.21a-1mdk
- The all-new and shiny 3.21a.

* Sat Aug 18 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 3.20-1mdk
- New and shiny source.

* Tue Jul 17 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.15-1mdk
- Bump up a new and shiny source.
- Explicitly specify compile with tcpwrappers in configure.

* Thu Mar 08 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.14-2mdk
- added openssl-devel and tcp_wrappers-devel in BuildRequires.
- use --localstatedir=/var/run.

* Mon Feb 26 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 3.14-1mdk
- Bump up to 3.14.

* Tue Jan 30 2001 Lenny Cartier <lenny@mandrakesoft.com> 3.13-1mdk
- updated to 3.13

* Sat Dec 23 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 3.11-1mdk
- new and shiny source code.
- fix build as non-root.
- s/%%buildroot/$RPM_BUILD_ROOT/
- added some rm -rf $RPM_BUILD_ROOT along the way to make build a lot more sane.
- fix non-interactive build.

* Tue Dec 19 2000 Vincent Danen <vdanen@linux-mandrake.com> 3.9-1mdk
- macros
- fix url
- make default pem dir to be /etc/stunnel
- 3.9 (big security fix!!)

* Thu Apr 27 2000 Vincent Danen <vdanen@linux-mandrake.com> 3.8-1mdk
- build for Mandrake

* Wed Jul 14 1999 Dirk O. Siebnich <dok@vossnet.de>
- updated for 3.5.

* Mon Jun 07 1999 Dirk O. Siebnich <dok@vossnet.de>
- adapted from sslwrap RPM spec file