]> git.pld-linux.org Git - packages/conserver.git/blob - conserver.spec
- adapterized (sorted %verify flags)
[packages/conserver.git] / conserver.spec
1 # TODO: smart .init/.sysconfig, maybe a default configuration
2 #
3 Summary:        Console server
4 Summary(pl):    Serwer konsoli
5 Name:           conserver
6 Version:        8.1.12
7 Release:        1
8 License:        BSD-like
9 Group:          Daemons
10 Source0:        http://www.conserver.com/%{name}-%{version}.tar.gz
11 # Source0-md5:  1fb356224f018625be5c3d35529a4ac6
12 Source1:        %{name}.init
13 Source2:        %{name}.sysconfig
14 Source3:        %{name}.logrotate
15 Patch0:         %{name}-locks.patch
16 URL:            http://www.conserver.com/
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  libwrap-devel
20 BuildRequires:  openssl-devel
21 BuildRequires:  pam-devel
22 Requires(post,preun):   /sbin/chkconfig
23 Requires:       rc-scripts
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _sysconfdir     /etc/conserver
27
28 %description
29 Conserver is an application that allows multiple users to watch a
30 serial console at the same time. It can log the data, allows users to
31 take write-access of a console (one at a time), and has a variety of
32 bells and whistles to accentuate that basic functionality.
33
34 %description -l pl
35 Conserver jest aplikacj±, która umo¿liwia kilku u¿ytkownikom naraz
36 ogl±daæ logi na konsoli szeregowej. Mo¿e zapisywaæ zebrane dane,
37 pozwalaæ u¿ytkownikom na pe³ne korzystanie z konsoli (ale tylko
38 jednemu naraz), oraz posiada mnóstwo dodatków rozszerzaj±cych tê
39 podstawow± funkcjonalno¶æ.
40
41 %prep
42 %setup -q
43 %patch0 -p1
44
45 %build
46 %{__aclocal}
47 %{__autoconf}
48 %{__autoheader}
49 %configure \
50         --with-master=localhost \
51         --with-extmsgs \
52         --with-libwrap \
53         --with-openssl \
54         --with-pam
55 #       --with-uds
56 %{__make}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60
61 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d,conserver} \
62         $RPM_BUILD_ROOT/var/log/{conserver.d,archiv/conserver.d}
63
64 %{__make} install \
65         DESTDIR=$RPM_BUILD_ROOT
66
67 mv $RPM_BUILD_ROOT%{_datadir}/examples/conserver examples
68
69 install examples/conserver.cf $RPM_BUILD_ROOT%{_sysconfdir}
70 touch $RPM_BUILD_ROOT%{_sysconfdir}/conserver.passwd
71 touch $RPM_BUILD_ROOT%{_sysconfdir}/console.cf
72
73 rm -f examples/conserver.rc
74 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/conserver
75 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/conserver
76 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/conserver
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %post
82 /sbin/chkconfig --add conserver
83 if [ -f /var/lock/subsys/conserver ]; then
84         /etc/rc.d/init.d/conserver restart 1>&2
85 else
86         echo "Run \"/etc/rc.d/init.d/conserver start\" to start conserver daemon."
87 fi
88
89 %preun
90 if [ "$1" = "0" ]; then
91         if [ -f /var/lock/subsys/conserver ]; then
92                 /etc/rc.d/init.d/conserver stop 1>&2
93         fi
94         /sbin/chkconfig --del conserver
95 fi
96
97 %files
98 %defattr(644,root,root,755)
99 %doc CHANGES FAQ README TODO examples LICENSE
100 %attr(755,root,root) %{_bindir}/*
101 %attr(755,root,root) %{_sbindir}/*
102 %attr(754,root,root) /etc/rc.d/init.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/archiv/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.047873 seconds and 3 git commands to generate.