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