]>
Commit | Line | Data |
---|---|---|
10f628c8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without systemd # systemd socket activation support | |
4 | ||
524b361e | 5 | Summary: Universal SSL tunnel |
835b466f | 6 | Summary(pl.UTF-8): Uniwersalne narzędzie do bezpiecznego tunelowania |
9ae646a2 | 7 | Name: stunnel |
c9470534 AO |
8 | Version: 5.62 |
9 | Release: 1 | |
010d13fd | 10 | License: GPL v2+ with OpenSSL exception |
9ae646a2 | 11 | Group: Networking/Daemons |
c9470534 AO |
12 | Source0: https://www.stunnel.org/downloads/%{name}-%{version}.tar.gz |
13 | # Source0-md5: e8cafad72a75252ff85210c0cef77f19 | |
44a8700b | 14 | Source1: %{name}.init |
15 | Source2: %{name}.sysconfig | |
60875471 | 16 | Source3: %{name}.inet |
57e3de36 | 17 | Source4: %{name}.tmpfiles |
6ee0e7ea AM |
18 | Patch0: %{name}-config.patch |
19 | Patch1: stunnel-libwrap_srv_name_log.patch | |
37abeb09 | 20 | URL: http://www.stunnel.org/ |
010d13fd | 21 | BuildRequires: autoconf >= 2.50 |
d294aa70 | 22 | BuildRequires: automake |
010d13fd | 23 | BuildRequires: libtool >= 2:2.0 |
8558cbbd | 24 | BuildRequires: libwrap-devel |
cc5de804 | 25 | BuildRequires: openssl-devel >= 0.9.7d |
26 | BuildRequires: openssl-tools >= 0.9.7d | |
84b2e84c | 27 | BuildRequires: rpmbuild(macros) >= 1.268 |
10f628c8 | 28 | %{?with_systemd:BuildRequires: systemd-devel} |
84b2e84c ER |
29 | Requires(postun): /sbin/ldconfig |
30 | Requires(postun): /usr/sbin/groupdel | |
31 | Requires(postun): /usr/sbin/userdel | |
60875471 | 32 | Requires(pre): /bin/id |
33 | Requires(pre): /usr/bin/getgid | |
34 | Requires(pre): /usr/sbin/groupadd | |
35 | Requires(pre): /usr/sbin/useradd | |
8558cbbd | 36 | Provides: group(stunnel) |
37 | Provides: user(stunnel) | |
76cd9e10 | 38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
9ae646a2 AF |
39 | |
40 | %description | |
a09eccee | 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. | |
9ae646a2 | 48 | |
0fbf70f7 JR |
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 | |
a54318b8 | 52 | pop3s lub HTTPS. |
9ae646a2 | 53 | |
60875471 | 54 | %package standalone |
e1b7f8cf | 55 | Summary: stunnel acts as standalone server |
835b466f | 56 | Summary(pl.UTF-8): stunnel działający jako samodzielny serwer |
60875471 | 57 | Group: Networking/Daemons |
06e2deeb | 58 | Requires(post,preun): /sbin/chkconfig |
74bc2c00 | 59 | Requires: %{name} = %{version}-%{release} |
84b2e84c ER |
60 | Requires: rc-scripts |
61 | Obsoletes: stunnel-inetd | |
60875471 | 62 | |
63 | %description standalone | |
64 | stunnel acts as standalone server. | |
65 | ||
0fbf70f7 JR |
66 | %description standalone -l pl.UTF-8 |
67 | stunnel działający jako samodzielny serwer. | |
60875471 | 68 | |
e1b7f8cf | 69 | %package inetd |
60875471 | 70 | Summary: stunnel acts as inetd service |
835b466f | 71 | Summary(pl.UTF-8): stunnel działający jako usługa inetd |
60875471 | 72 | Group: Networking/Daemons |
74bc2c00 | 73 | Requires: %{name} = %{version}-%{release} |
84b2e84c ER |
74 | Requires: rc-inetd |
75 | Obsoletes: stunnel-standalone | |
60875471 | 76 | |
77 | %description inetd | |
78 | stunnel acts as inetd service. | |
79 | ||
0fbf70f7 JR |
80 | %description inetd -l pl.UTF-8 |
81 | stunnel działający jako usługa inetd. | |
60875471 | 82 | |
c9470534 AO |
83 | %package -n bash-completion-stunnel |
84 | Summary: bash-completion for stunnel command | |
85 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów polecenia stunnel | |
86 | Group: Applications/Shells | |
87 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
88 | Requires: bash-completion >= 2.0 | |
89 | BuildArch: noarch | |
90 | ||
91 | %description -n bash-completion-stunnel | |
92 | This package provides bash-completion for stunnel command. | |
93 | ||
94 | %description -n bash-completion-stunnel -l pl.UTF-8 | |
95 | Pakiet ten dostarcza bashowe uzupełnianie parametrów polecenia | |
96 | stunnel. | |
97 | ||
9ae646a2 | 98 | %prep |
6c781bbd | 99 | %setup -q |
19b62492 | 100 | %patch0 -p1 |
6ee0e7ea | 101 | %patch1 -p1 |
9ae646a2 AF |
102 | |
103 | %build | |
0e99d670 | 104 | %{__libtoolize} |
91df0f44 | 105 | %{__aclocal} |
46c7d442 | 106 | %{__autoconf} |
91df0f44 | 107 | %{__automake} |
6ee0e7ea | 108 | %configure \ |
10f628c8 JB |
109 | --disable-silent-rules \ |
110 | %{!?with_systemd:--disable-systemd} | |
d0f1803e | 111 | %{__make} |
9ae646a2 AF |
112 | |
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
57e3de36 | 115 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig/rc-inetd},%{_mandir}/{pl,fr}/man8,%{_var}/run/stunnel} \ |
10f628c8 | 116 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
91df0f44 | 117 | |
71561493 PG |
118 | %{__make} install \ |
119 | DESTDIR=$RPM_BUILD_ROOT | |
9ae646a2 | 120 | |
10f628c8 JB |
121 | %{__mv} $RPM_BUILD_ROOT%{_mandir}/man8/stunnel.pl.8 $RPM_BUILD_ROOT%{_mandir}/pl/man8/stunnel.8 |
122 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/stunnel/stunnel.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/stunnel/stunnel.conf | |
24811fcc | 123 | |
44a8700b | 124 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/stunnel |
125 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/stunnel | |
60875471 | 126 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/stunnel |
10f628c8 | 127 | install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
44a8700b | 128 | |
1c6cf200 JB |
129 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/stunnel |
130 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/stunnel | |
06e2deeb | 131 | |
c9470534 AO |
132 | %{__mv} $RPM_BUILD_ROOT%{bash_compdir}/stunnel.bash $RPM_BUILD_ROOT%{bash_compdir}/stunnel |
133 | ||
9ae646a2 AF |
134 | %clean |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
60875471 | 137 | %pre |
9e7c4260 ER |
138 | %groupadd -g 130 stunnel |
139 | %useradd -u 130 -d /var/run/stunnel -s /bin/false -c "stunnel User" -g stunnel stunnel | |
60875471 | 140 | |
06e2deeb JB |
141 | %post -p /sbin/ldconfig |
142 | ||
e1b7f8cf | 143 | %postun |
06e2deeb | 144 | /sbin/ldconfig |
60875471 | 145 | if [ "$1" = "0" ]; then |
8558cbbd | 146 | %userremove stunnel |
147 | %groupremove stunnel | |
60875471 | 148 | fi |
149 | ||
150 | %post standalone | |
151 | /sbin/chkconfig --add stunnel | |
84b2e84c | 152 | %service stunnel restart "stunnel daemon" |
60875471 | 153 | |
154 | %preun standalone | |
155 | if [ "$1" = "0" ]; then | |
84b2e84c | 156 | %service stunnel stop |
60875471 | 157 | /sbin/chkconfig --del stunnel |
158 | fi | |
159 | ||
160 | %post inetd | |
84b2e84c | 161 | %service -q rc-inetd reload |
60875471 | 162 | |
163 | %postun inetd | |
84b2e84c ER |
164 | if [ "$1" = "0" ]; then |
165 | %service -q rc-inetd reload | |
60875471 | 166 | fi |
b000d92e | 167 | |
9ae646a2 AF |
168 | %files |
169 | %defattr(644,root,root,755) | |
4e06042d | 170 | # note: this COPYING contains general information not GPL text |
c9470534 | 171 | %doc AUTHORS.md BUGS.md COPYING.md CREDITS.md NEWS.md PORTS.md README.md TODO.md doc/en/* doc/stunnel.html tools/{ca.*,importCA.*} |
91df0f44 | 172 | %doc %lang(pl) doc/pl/* doc/stunnel.pl.html |
010d13fd JB |
173 | %attr(755,root,root) %{_bindir}/stunnel |
174 | %attr(755,root,root) %{_bindir}/stunnel3 | |
be73512e | 175 | %dir %{_sysconfdir}/stunnel |
06e2deeb | 176 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/stunnel/stunnel.conf |
010d13fd | 177 | %attr(750,stunnel,stunnel) %{_var}/run/stunnel |
10f628c8 | 178 | %{systemdtmpfilesdir}/%{name}.conf |
010d13fd | 179 | %{_mandir}/man8/stunnel.8* |
010d13fd | 180 | %lang(pl) %{_mandir}/pl/man8/stunnel.8* |
60875471 | 181 | |
182 | %files standalone | |
183 | %defattr(644,root,root,755) | |
184 | %attr(754,root,root) /etc/rc.d/init.d/stunnel | |
06e2deeb | 185 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stunnel |
60875471 | 186 | |
187 | %files inetd | |
188 | %defattr(644,root,root,755) | |
06e2deeb | 189 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/stunnel |
c9470534 AO |
190 | |
191 | %files -n bash-completion-stunnel | |
192 | %defattr(644,root,root,755) | |
193 | %{bash_compdir}/stunnel |