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