]> git.pld-linux.org Git - SPECS.git/blob - sslh.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / sslh.spec
1 Summary:        sslh - ssl/ssh multiplexer
2 Summary(pl.UTF-8):      multiplekser ssl/ssh
3 Name:           sslh
4 Version:        1.20
5 Release:        0.1
6 License:        GPL v2+
7 Group:          Applications
8 Source0:        http://www.rutschle.net/tech/sslh/%{name}-v%{version}.tar.gz
9 # Source0-md5:  6a69c6128d0349e5fb22167675d18aee
10 Source1:        %{name}.sysconfig
11 Source2:        %{name}.init
12 Source3:        %{name}.service
13 Patch3:         %{name}-man.patch
14 URL:            http://www.rutschle.net/tech/sslh/README.html
15 BuildRequires:  libwrap-devel
16 BuildRequires:  perl-tools-pod
17 BuildRequires:  rpmbuild(macros) >= 1.644
18 Requires(postun):       /usr/sbin/userdel
19 Requires(postun):       /usr/sbin/groupdel
20 Requires(pre):  /bin/id
21 Requires(pre):  /usr/bin/getgid
22 Requires(pre):  /usr/sbin/useradd
23 Requires(pre):  /usr/sbin/groupadd
24 Requires(post,preun,postun):    systemd-units >= 38
25 Requires:       systemd-units >= 38
26 Provides:       group(sslh)
27 Provides:       user(sslh)
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 sslh accepts HTTPS, SSH, OpenVPN, tinc and XMPP connections on the
32 same port. This makes it possible to connect to any of these servers
33 on port 443 (e.g. from inside a corporate firewall, which almost never
34 block port 443) while still serving HTTPS on that port.
35
36 %description -l pl.UTF-8
37 sslh akceptuje połączenia HTTPS, SSH, OpenVPN, tinc oraz XMPPP na tym
38 samym porcie. Pozwala to na nawiązanie połączenie z którąkolwiek z
39 tych usług na porcie 443 (n.p. zza firmowego firewalla, który rzadko
40 kiedy blokuje połączenia na ten port) równolegle z usługami HTTPS.
41
42 %prep
43 %setup -q -n %{name}-v%{version}
44 %patch3 -p1
45
46 %build
47 %{__make} \
48         CC="%{__cc}" \
49         CFLAGS="%{rpmcflags}" \
50         LDFLAGS="%{rpmldflags}" \
51         USELIBWRAP=1
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{systemdunitdir}}
56
57 %{__make} install \
58         PREFIX="%{_prefix}" \
59         DESTDIR=$RPM_BUILD_ROOT
60
61 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/sslh
62 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/sslh
63 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %pre
69 %groupadd -g 277 sslh
70 %useradd -u 277 -r -d /usr/share/empty -s /bin/false -c "sslh user" -g sslh sslh
71
72 %post
73 /sbin/chkconfig --add sslh
74 %systemd_post %{name}.service
75
76 %preun
77 if [ "$1" = "0" ]; then
78         %service sslh stop
79         /sbin/chkconfig --del sslh
80 fi
81 %systemd_preun %{name}.service
82
83 %postun
84 if [ "$1" = "0" ]; then
85         %userremove sslh
86         %groupremove sslh
87 fi
88 %systemd_reload
89
90 %files
91 %defattr(644,root,root,755)
92 %doc ChangeLog README*
93 %attr(754,root,root) /etc/rc.d/init.d/sslh
94 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sslh
95 %attr(755,root,root) %{_sbindir}/*
96 %{_mandir}/man8/sslh.8*
97 %{systemdunitdir}/%{name}.service
This page took 0.576558 seconds and 3 git commands to generate.