]> git.pld-linux.org Git - packages/eximstate.git/blob - eximstate.spec
- /home/services -> /srv
[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:        2
6 License:        GPL
7 Group:          Applications/Mail
8 Source0:        http://www.olliecook.net/projects/%{name}/%{name}.tar.gz
9 # Source0-md5:  e59355c849577dc5354e2614a5246aba
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Source3:        %{name}d.init
13 Source4:        %{name}d.sysconfig
14 Patch0:         %{name}-debug.patch
15 URL:            http://www.olliecook.net/projects/eximstate/
16 BuildRequires:  ncurses-devel
17 BuildRequires:  rrdtool-devel
18 Requires(post,preun):   /sbin/chkconfig
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:         rc-scripts
47 Requires(post,preun):   /sbin/chkconfig
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 client -l pl
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 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_localstatedir}}
71
72 %{__make} install \
73         DESTDIR=$RPM_BUILD_ROOT
74
75 cp $RPM_BUILD_ROOT%{_sbindir}/graphrrd.sh .
76 sed -e 's#%{_prefix}/local/apache/htdocs/#/srv/httpd/html/%{name}/#g' graphrrd.sh \
77         > $RPM_BUILD_ROOT%{_sbindir}/graphrrd.sh
78
79 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
80 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
81 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}d
82 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}d
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %post
88 /sbin/chkconfig --add %{name}d
89 if [ -f %{_var}/lock/subsys/%{name}d ]; then
90         /etc/rc.d/init.d/%{name}d restart 1>&2
91 else
92         echo "Run \"/usr/sbin/makenewrrd.sh <host>\" for each your monitored host."
93         echo "Run \"/etc/rc.d/init.d/%{name}d start\" to start %{name}d daemon."
94 fi
95
96 %preun
97 if [ "$1" = "0" -a -f %{_var}/lock/subsys/%{name}d ]; then
98         /etc/rc.d/init.d/%{name}d stop 1>&2
99 fi
100 /sbin/chkconfig --del %{name}d
101
102 %post client
103 /sbin/chkconfig --add %{name}
104 if [ -f %{_var}/lock/subsys/%{name} ]; then
105         /etc/rc.d/init.d/%{name} restart 1>&2
106 else
107         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
108 fi
109
110 %preun client
111 if [ "$1" = "0" -a -f %{_var}/lock/subsys/%{name} ]; then
112         /etc/rc.d/init.d/%{name} stop 1>&2
113 fi
114 /sbin/chkconfig --del %{name}
115
116 %files
117 %defattr(644,root,root,755)
118 %doc AUTHORS ChangeLog NEWS README
119 %attr(755,root,root) %{_bindir}/exitop
120 %attr(755,root,root) %{_sbindir}/eximstated
121 %attr(755,root,root) %{_sbindir}/*.sh
122
123 %dir %{_sysconfdir}
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}d.conf
125 %attr(755,root,root) %{_var}/spool/%{name}
126
127 %attr(754,root,root) /etc/rc.d/init.d/%{name}d
128 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}d
129
130 %files client
131 %defattr(644,root,root,755)
132 %attr(755,root,root) %{_bindir}/eximstate
133 %dir %{_sysconfdir}
134 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
135
136 %attr(754,root,root) /etc/rc.d/init.d/%{name}
137 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
This page took 0.064002 seconds and 3 git commands to generate.