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