]> git.pld-linux.org Git - packages/conserver.git/blob - conserver.spec
- up to 8.2.6, drop outdated/obsolete patches
[packages/conserver.git] / conserver.spec
1 # TODO: smart .init/.sysconfig, maybe a default configuration
2 #
3 Summary:        Console server
4 Summary(pl.UTF-8):      Serwer konsoli
5 Name:           conserver
6 Version:        8.2.6
7 Release:        1
8 License:        BSD-like
9 Group:          Daemons
10 Source0:        https://github.com/bstansell/conserver/releases/download/v%{version}/%{name}-%{version}.tar.gz
11 # Source0-md5:  f04d6ab6172d81db24886b12f224940c
12 Source1:        %{name}.init
13 Source2:        %{name}.sysconfig
14 Source3:        %{name}.logrotate
15 Source4:        %{name}.pam
16 Source5:        %{name}.service
17 URL:            http://www.conserver.com/
18 BuildRequires:  autoconf
19 BuildRequires:  automake
20 BuildRequires:  libwrap-devel
21 BuildRequires:  openssl-devel
22 BuildRequires:  pam-devel
23 BuildRequires:  rpmbuild(macros) >= 1.644
24 Requires(post,preun):   /sbin/chkconfig
25 Requires:       rc-scripts
26 Requires:       systemd-units >= 38
27 Conflicts:      logrotate < 3.7-4
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _sysconfdir     /etc/conserver
31
32 %description
33 Conserver is an application that allows multiple users to watch a
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.
37
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ść.
44
45 %prep
46 %setup -q
47
48 %build
49 %configure \
50         --with-master=localhost \
51         --with-port=782 \
52         --with-extmsgs \
53         --with-libwrap \
54         --with-openssl \
55         --with-pam
56 #       --with-uds
57 %{__make}
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d,conserver,pam.d} \
63         $RPM_BUILD_ROOT/var/log/{conserver.d,archive/conserver.d} \
64         $RPM_BUILD_ROOT%{systemdunitdir}
65
66 %{__make} install \
67         DESTDIR=$RPM_BUILD_ROOT
68
69 mv $RPM_BUILD_ROOT%{_datadir}/examples/conserver examples
70
71 cp -p examples/conserver.cf $RPM_BUILD_ROOT%{_sysconfdir}
72 touch $RPM_BUILD_ROOT%{_sysconfdir}/conserver.passwd
73 touch $RPM_BUILD_ROOT%{_sysconfdir}/console.cf
74
75 rm -f examples/conserver.rc
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
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %post
86 /sbin/chkconfig --add conserver
87 %service conserver restart "conserver daemon"
88 %systemd_post %{name}.service
89
90 %preun
91 if [ "$1" = "0" ]; then
92         %service conserver stop
93         /sbin/chkconfig --del conserver
94 fi
95 %systemd_preun %{name}.service
96
97 %postun
98 %systemd_reload
99
100 %files
101 %defattr(644,root,root,755)
102 %doc CHANGES FAQ README.md TODO examples LICENSES
103 %attr(755,root,root) %{_bindir}/*
104 %attr(755,root,root) %{_sbindir}/*
105 %dir %{_libdir}/conserver
106 %attr(755,root,root) %{_libdir}/conserver/convert
107 %attr(754,root,root) /etc/rc.d/init.d/conserver
108 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/conserver
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/*
111 %attr(750,root,root) %dir /var/log/conserver.d
112 %attr(750,root,root) %dir /var/log/archive/conserver.d
113 %dir %{_sysconfdir}
114 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
115 %{_mandir}/man*/*
116 %{systemdunitdir}/%{name}.service
This page took 0.137542 seconds and 4 git commands to generate.