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