3 %bcond_without systemd # systemd socket activation support
5 Summary: Universal SSL tunnel
6 Summary(pl.UTF-8): Uniwersalne narzędzie do bezpiecznego tunelowania
10 License: GPL v2+ with OpenSSL exception
11 Group: Networking/Daemons
12 Source0: ftp://ftp.stunnel.org/stunnel/%{name}-%{version}.tar.gz
13 # Source0-md5: 5d072fd915f4cde106525cf549bced39
15 Source2: %{name}.sysconfig
17 Source4: %{name}.tmpfiles
18 Patch0: %{name}-config.patch
19 Patch1: stunnel-libwrap_srv_name_log.patch
20 URL: http://www.stunnel.org/
21 BuildRequires: autoconf >= 2.50
22 BuildRequires: automake
23 BuildRequires: libtool >= 2:2.0
24 BuildRequires: libwrap-devel
25 BuildRequires: openssl-devel >= 0.9.7d
26 BuildRequires: openssl-tools >= 0.9.7d
27 BuildRequires: rpmbuild(macros) >= 1.268
28 %{?with_systemd:BuildRequires: systemd-devel}
29 Requires(postun): /sbin/ldconfig
30 Requires(postun): /usr/sbin/groupdel
31 Requires(postun): /usr/sbin/userdel
32 Requires(pre): /bin/id
33 Requires(pre): /usr/bin/getgid
34 Requires(pre): /usr/sbin/groupadd
35 Requires(pre): /usr/sbin/useradd
36 Provides: group(stunnel)
37 Provides: user(stunnel)
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 The stunnel program is designed to work as SSL encryption wrapper
42 between remote client and local (inetd-startable) or remote server.
43 The concept is that having non-SSL aware daemons running on your
44 system you can easily setup them to communicate with clients over
45 secure SSL channel. stunnel can be used to add SSL functionality to
46 commonly used inetd daemons like POP-2, POP-3 and IMAP servers without
47 any changes in the programs' code.
49 %description -l pl.UTF-8
50 Stunnel umożliwia stawianie silnie kodowanych tuneli pomiędzy serwerem
51 a komputerem klienta. Przy jego użyciu można łatwo zrealizować usługi
55 Summary: stunnel acts as standalone server
56 Summary(pl.UTF-8): stunnel działający jako samodzielny serwer
57 Group: Networking/Daemons
58 Requires(post,preun): /sbin/chkconfig
59 Requires: %{name} = %{version}-%{release}
61 Obsoletes: stunnel-inetd
63 %description standalone
64 stunnel acts as standalone server.
66 %description standalone -l pl.UTF-8
67 stunnel działający jako samodzielny serwer.
70 Summary: stunnel acts as inetd service
71 Summary(pl.UTF-8): stunnel działający jako usługa inetd
72 Group: Networking/Daemons
73 Requires: %{name} = %{version}-%{release}
75 Obsoletes: stunnel-standalone
78 stunnel acts as inetd service.
80 %description inetd -l pl.UTF-8
81 stunnel działający jako usługa inetd.
94 --disable-silent-rules \
95 %{!?with_systemd:--disable-systemd}
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig/rc-inetd},%{_mandir}/{pl,fr}/man8,%{_var}/run/stunnel} \
101 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
104 DESTDIR=$RPM_BUILD_ROOT
106 %{__mv} $RPM_BUILD_ROOT%{_mandir}/man8/stunnel.pl.8 $RPM_BUILD_ROOT%{_mandir}/pl/man8/stunnel.8
107 %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/stunnel/stunnel.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/stunnel/stunnel.conf
109 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/stunnel
110 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/stunnel
111 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/stunnel
112 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
114 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/stunnel
115 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/stunnel
118 rm -rf $RPM_BUILD_ROOT
121 %groupadd -g 130 stunnel
122 %useradd -u 130 -d /var/run/stunnel -s /bin/false -c "stunnel User" -g stunnel stunnel
124 %post -p /sbin/ldconfig
128 if [ "$1" = "0" ]; then
134 /sbin/chkconfig --add stunnel
135 %service stunnel restart "stunnel daemon"
138 if [ "$1" = "0" ]; then
139 %service stunnel stop
140 /sbin/chkconfig --del stunnel
144 %service -q rc-inetd reload
147 if [ "$1" = "0" ]; then
148 %service -q rc-inetd reload
152 %defattr(644,root,root,755)
153 # note: this COPYING contains general information not GPL text
154 %doc AUTHORS BUGS COPYING CREDITS ChangeLog NEWS PORTS README TODO doc/en/* doc/stunnel.html tools/{ca.*,importCA.*}
155 %doc %lang(pl) doc/pl/* doc/stunnel.pl.html
156 %attr(755,root,root) %{_bindir}/stunnel
157 %attr(755,root,root) %{_bindir}/stunnel3
158 %dir %{_sysconfdir}/stunnel
159 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/stunnel/stunnel.conf
160 %attr(750,stunnel,stunnel) %{_var}/run/stunnel
161 %{systemdtmpfilesdir}/%{name}.conf
162 %{_mandir}/man8/stunnel.8*
163 %lang(pl) %{_mandir}/pl/man8/stunnel.8*
166 %defattr(644,root,root,755)
167 %attr(754,root,root) /etc/rc.d/init.d/stunnel
168 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stunnel
171 %defattr(644,root,root,755)
172 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/stunnel