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