]>
Commit | Line | Data |
---|---|---|
3a3b4efe | 1 | # TODO: smart .init/.sysconfig, maybe a default configuration |
b1b074f6 | 2 | # |
307e1437 | 3 | Summary: Console server |
d0fbf2e9 | 4 | Summary(pl.UTF-8): Serwer konsoli |
307e1437 | 5 | Name: conserver |
ca5f8623 | 6 | Version: 8.2.6 |
82598a59 | 7 | Release: 2 |
307e1437 SZ |
8 | License: BSD-like |
9 | Group: Daemons | |
ca5f8623 JR |
10 | Source0: https://github.com/bstansell/conserver/releases/download/v%{version}/%{name}-%{version}.tar.gz |
11 | # Source0-md5: f04d6ab6172d81db24886b12f224940c | |
280e2648 SZ |
12 | Source1: %{name}.init |
13 | Source2: %{name}.sysconfig | |
14 | Source3: %{name}.logrotate | |
f751d6d8 | 15 | Source4: %{name}.pam |
145e2a5a | 16 | Source5: %{name}.service |
307e1437 | 17 | URL: http://www.conserver.com/ |
3a3b4efe JB |
18 | BuildRequires: autoconf |
19 | BuildRequires: automake | |
626224d0 | 20 | BuildRequires: libwrap-devel |
e8c44a85 | 21 | BuildRequires: openssl-devel |
626224d0 | 22 | BuildRequires: pam-devel |
145e2a5a | 23 | BuildRequires: rpmbuild(macros) >= 1.644 |
5e8ff9de | 24 | Requires(post,preun): /sbin/chkconfig |
e8c44a85 | 25 | Requires: rc-scripts |
145e2a5a | 26 | Requires: systemd-units >= 38 |
d1deecf9 | 27 | Conflicts: logrotate < 3.7-4 |
307e1437 SZ |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
db252a97 AM |
30 | %define _sysconfdir /etc/conserver |
31 | ||
307e1437 SZ |
32 | %description |
33 | Conserver is an application that allows multiple users to watch a | |
e8c44a85 ER |
34 | serial console at the same time. It can log the data, allows users to |
35 | take write-access of a console (one at a time), and has a variety of | |
36 | bells and whistles to accentuate that basic functionality. | |
307e1437 | 37 | |
f00f8fcb JR |
38 | %description -l pl.UTF-8 |
39 | Conserver jest aplikacją, która umożliwia kilku użytkownikom naraz | |
40 | oglądać logi na konsoli szeregowej. Może zapisywać zebrane dane, | |
41 | pozwalać użytkownikom na pełne korzystanie z konsoli (ale tylko | |
42 | jednemu naraz), oraz posiada mnóstwo dodatków rozszerzających tę | |
43 | podstawową funkcjonalność. | |
307e1437 SZ |
44 | |
45 | %prep | |
46 | %setup -q | |
47 | ||
48 | %build | |
280e2648 | 49 | %configure \ |
626224d0 | 50 | --with-master=localhost \ |
f751d6d8 | 51 | --with-port=782 \ |
626224d0 AM |
52 | --with-extmsgs \ |
53 | --with-libwrap \ | |
54 | --with-openssl \ | |
55 | --with-pam | |
8b0a1e7b | 56 | # --with-uds |
307e1437 SZ |
57 | %{__make} |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
f751d6d8 | 62 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d,conserver,pam.d} \ |
145e2a5a JK |
63 | $RPM_BUILD_ROOT/var/log/{conserver.d,archive/conserver.d} \ |
64 | $RPM_BUILD_ROOT%{systemdunitdir} | |
db252a97 | 65 | |
307e1437 SZ |
66 | %{__make} install \ |
67 | DESTDIR=$RPM_BUILD_ROOT | |
3a3b4efe | 68 | |
307e1437 | 69 | mv $RPM_BUILD_ROOT%{_datadir}/examples/conserver examples |
db252a97 | 70 | |
ca5f8623 | 71 | cp -p examples/conserver.cf $RPM_BUILD_ROOT%{_sysconfdir} |
db252a97 AM |
72 | touch $RPM_BUILD_ROOT%{_sysconfdir}/conserver.passwd |
73 | touch $RPM_BUILD_ROOT%{_sysconfdir}/console.cf | |
74 | ||
280e2648 | 75 | rm -f examples/conserver.rc |
ca5f8623 JR |
76 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/conserver |
77 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/conserver | |
78 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/conserver | |
79 | cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/conserver | |
80 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service | |
307e1437 SZ |
81 | |
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
280e2648 SZ |
85 | %post |
86 | /sbin/chkconfig --add conserver | |
e500d97f | 87 | %service conserver restart "conserver daemon" |
145e2a5a | 88 | %systemd_post %{name}.service |
280e2648 SZ |
89 | |
90 | %preun | |
91 | if [ "$1" = "0" ]; then | |
e500d97f | 92 | %service conserver stop |
6f1a4388 | 93 | /sbin/chkconfig --del conserver |
280e2648 | 94 | fi |
145e2a5a JK |
95 | %systemd_preun %{name}.service |
96 | ||
97 | %postun | |
98 | %systemd_reload | |
280e2648 | 99 | |
307e1437 SZ |
100 | %files |
101 | %defattr(644,root,root,755) | |
ca5f8623 | 102 | %doc CHANGES FAQ README.md TODO examples LICENSES |
307e1437 SZ |
103 | %attr(755,root,root) %{_bindir}/* |
104 | %attr(755,root,root) %{_sbindir}/* | |
ca5f8623 JR |
105 | %dir %{_libdir}/conserver |
106 | %attr(755,root,root) %{_libdir}/conserver/convert | |
280e2648 | 107 | %attr(754,root,root) /etc/rc.d/init.d/conserver |
f751d6d8 | 108 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/conserver |
e8c44a85 ER |
109 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/* |
110 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/* | |
280e2648 | 111 | %attr(750,root,root) %dir /var/log/conserver.d |
d5bfc45f | 112 | %attr(750,root,root) %dir /var/log/archive/conserver.d |
e8c44a85 ER |
113 | %dir %{_sysconfdir} |
114 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/* | |
307e1437 | 115 | %{_mandir}/man*/* |
145e2a5a | 116 | %{systemdunitdir}/%{name}.service |