]> git.pld-linux.org Git - packages/eximstate.git/blob - eximstate.spec
- tabs in preamble
[packages/eximstate.git] / eximstate.spec
1 # TODO: what non-existing directory in /home/services/httpd/html is used for???
2 Summary:        Monitoring exim installations
3 Summary(pl.UTF-8):      Monitorowanie instalacji exima
4 Name:           eximstate
5 Version:        1.1
6 Release:        3
7 License:        GPL
8 Group:          Applications/Mail
9 Source0:        http://www.olliecook.net/projects/eximstate/releases/%{name}-%{version}.tar.gz
10 # Source0-md5:  e59355c849577dc5354e2614a5246aba
11 Source1:        %{name}.init
12 Source2:        %{name}.sysconfig
13 Source3:        %{name}d.init
14 Source4:        %{name}d.sysconfig
15 Patch0:         %{name}-debug.patch
16 URL:            http://www.olliecook.net/projects/eximstate/
17 BuildRequires:  ncurses-devel
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 BuildRequires:  rrdtool-devel >= 1.2.10
20 Requires(post,preun):   /sbin/chkconfig
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         _sysconfdir     /etc/eximstate
24 %define         _localstatedir  %{_var}/spool/%{name}
25
26 %description
27 eximstate is a server/client project for monitoring a number of Exim
28 installations. The clients are installed on each of the mailservers
29 running exim and the server runs on the monitoring server. Each client
30 reads the queue on the mail server and sends the total number of
31 messages, the number of frozen message, and the number of bounce
32 messages to the server. The server stores this data and uses RRDtool
33 to make a graphical representations of the data.
34
35 %description -l pl.UTF-8
36 eximstate to klient/serwer do monitorowania instalacji Exima. Klienty
37 zainstalowane są na każdym serwerze poczty pracującym pod kontrolą
38 Exima natomiast serwer eximstate na serwerze monitorującym. Każdy
39 klient czyta kolejkę na serwerze pocztowym oraz przesyła informacje o
40 całkowitej liczbie wiadomości, liczbie wiadomości zamrożonych oraz
41 odbitych. Serwer eximstate zapisuje te dane oraz używa RRDtoola w celu
42 stworzenia graficznej reprezentacji danych.
43
44 %package client
45 Summary:        eximstate client
46 Summary(pl.UTF-8):      Klient eximstate
47 Group:          Networking
48 Requires(post,preun):   /sbin/chkconfig
49 Requires:       exim >= 3.0.0
50 Requires:       rc-scripts
51
52 %description client
53 eximstate is a server/client project for monitoring a number of Exim
54 installations. This package contains client.
55
56 %description client -l pl.UTF-8
57 eximstate to klient/serwer do monitorowania instalacji Exima. Ten
58 pakiet zawiera klienta.
59
60 %prep
61 %setup -q
62 %patch0 -p1
63
64 %build
65 %configure \
66         CPPFLAGS="-I/usr/include/ncurses" \
67         --with-rrdtool=%{_prefix}
68 %{__make}
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_localstatedir}}
73
74 %{__make} install \
75         DESTDIR=$RPM_BUILD_ROOT
76
77 cp $RPM_BUILD_ROOT%{_sbindir}/graphrrd.sh .
78 sed -e 's#%{_prefix}/local/apache/htdocs/#/home/services/httpd/html/%{name}/#g' graphrrd.sh \
79         > $RPM_BUILD_ROOT%{_sbindir}/graphrrd.sh
80
81 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
82 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
83 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}d
84 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}d
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %post
90 /sbin/chkconfig --add %{name}d
91 if [ "$1" = 1 ]; then
92         echo "Run \"%{_sbindir}/makenewrrd.sh <host>\" for each your monitored host."
93 fi
94 %service %{name}d restart "%{name}d daemon"
95
96 %preun
97 if [ "$1" = "0" ]; then
98         %service %{name}d stop
99         /sbin/chkconfig --del %{name}d
100 fi
101
102 %post client
103 /sbin/chkconfig --add %{name}
104 %service %{name} restart "%{name} daemon"
105
106 %preun client
107 if [ "$1" = "0" ]; then
108         %service %{name} stop
109         /sbin/chkconfig --del %{name}
110 fi
111
112 %files
113 %defattr(644,root,root,755)
114 %doc AUTHORS ChangeLog NEWS README
115 %attr(755,root,root) %{_bindir}/exitop
116 %attr(755,root,root) %{_sbindir}/eximstated
117 %attr(755,root,root) %{_sbindir}/*.sh
118
119 %dir %{_sysconfdir}
120 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}d.conf
121 %attr(755,root,root) %{_var}/spool/%{name}
122
123 %attr(754,root,root) /etc/rc.d/init.d/%{name}d
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}d
125
126 %files client
127 %defattr(644,root,root,755)
128 %attr(755,root,root) %{_bindir}/eximstate
129 %dir %{_sysconfdir}
130 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
131
132 %attr(754,root,root) /etc/rc.d/init.d/%{name}
133 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
This page took 0.038425 seconds and 3 git commands to generate.