]> git.pld-linux.org Git - packages/conserver.git/blob - conserver.spec
Release 2 (by relup.sh)
[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.1.18
7 Release:        2
8 License:        BSD-like
9 Group:          Daemons
10 Source0:        http://www.conserver.com/%{name}-%{version}.tar.gz
11 # Source0-md5:  93d1c38df71b4e3fd5d8f7ad6fc186bb
12 Source1:        %{name}.init
13 Source2:        %{name}.sysconfig
14 Source3:        %{name}.logrotate
15 Source4:        %{name}.pam
16 Source5:        %{name}.service
17 Patch0:         %{name}-locks.patch
18 URL:            http://www.conserver.com/
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 BuildRequires:  libwrap-devel
22 BuildRequires:  openssl-devel
23 BuildRequires:  pam-devel
24 BuildRequires:  rpmbuild(macros) >= 1.644
25 Requires(post,preun):   /sbin/chkconfig
26 Requires:       rc-scripts
27 Requires:       systemd-units >= 38
28 Conflicts:      logrotate < 3.7-4
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _sysconfdir     /etc/conserver
32
33 %description
34 Conserver is an application that allows multiple users to watch a
35 serial console at the same time. It can log the data, allows users to
36 take write-access of a console (one at a time), and has a variety of
37 bells and whistles to accentuate that basic functionality.
38
39 %description -l pl.UTF-8
40 Conserver jest aplikacją, która umożliwia kilku użytkownikom naraz
41 oglądać logi na konsoli szeregowej. Może zapisywać zebrane dane,
42 pozwalać użytkownikom na pełne korzystanie z konsoli (ale tylko
43 jednemu naraz), oraz posiada mnóstwo dodatków rozszerzających tę
44 podstawową funkcjonalność.
45
46 %prep
47 %setup -q
48 %patch0 -p1
49
50 %build
51 %{__aclocal}
52 %{__autoconf}
53 %{__autoheader}
54 %configure \
55         --with-master=localhost \
56         --with-port=782 \
57         --with-extmsgs \
58         --with-libwrap \
59         --with-openssl \
60         --with-pam
61 #       --with-uds
62 %{__make}
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d,conserver,pam.d} \
68         $RPM_BUILD_ROOT/var/log/{conserver.d,archive/conserver.d} \
69         $RPM_BUILD_ROOT%{systemdunitdir}
70
71 %{__make} install \
72         DESTDIR=$RPM_BUILD_ROOT
73
74 mv $RPM_BUILD_ROOT%{_datadir}/examples/conserver examples
75
76 install examples/conserver.cf $RPM_BUILD_ROOT%{_sysconfdir}
77 touch $RPM_BUILD_ROOT%{_sysconfdir}/conserver.passwd
78 touch $RPM_BUILD_ROOT%{_sysconfdir}/console.cf
79
80 rm -f examples/conserver.rc
81 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/conserver
82 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/conserver
83 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/conserver
84 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/conserver
85 install %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post
91 /sbin/chkconfig --add conserver
92 %service conserver restart "conserver daemon"
93 %systemd_post %{name}.service
94
95 %preun
96 if [ "$1" = "0" ]; then
97         %service conserver stop
98         /sbin/chkconfig --del conserver
99 fi
100 %systemd_preun %{name}.service
101
102 %postun
103 %systemd_reload
104
105 %files
106 %defattr(644,root,root,755)
107 %doc CHANGES FAQ README TODO examples LICENSE
108 %attr(755,root,root) %{_bindir}/*
109 %attr(755,root,root) %{_sbindir}/*
110 %attr(754,root,root) /etc/rc.d/init.d/conserver
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/conserver
112 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
114 %attr(750,root,root) %dir /var/log/conserver.d
115 %attr(750,root,root) %dir /var/log/archive/conserver.d
116 %dir %{_sysconfdir}
117 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
118 %{_mandir}/man*/*
119 %{systemdunitdir}/%{name}.service
This page took 0.075695 seconds and 3 git commands to generate.