]>
Commit | Line | Data |
---|---|---|
4045fdf9 | 1 | # TODO: what non-existing directory in /home/services/httpd/html is used for??? |
4d538166 | 2 | Summary: Monitoring exim installations |
c27d21da | 3 | Summary(pl.UTF-8): Monitorowanie instalacji exima |
bdbabb7d | 4 | Name: eximstate |
5ab63431 | 5 | Version: 1.1 |
454a9d80 | 6 | Release: 3 |
bf24485c | 7 | License: GPL |
8 | Group: Applications/Mail | |
5a407d11 | 9 | Source0: http://www.olliecook.net/projects/eximstate/releases/%{name}-%{version}.tar.gz |
77860a37 | 10 | # Source0-md5: e59355c849577dc5354e2614a5246aba |
bdbabb7d AM |
11 | Source1: %{name}.init |
12 | Source2: %{name}.sysconfig | |
13 | Source3: %{name}d.init | |
14 | Source4: %{name}d.sysconfig | |
15 | Patch0: %{name}-debug.patch | |
bf24485c | 16 | URL: http://www.olliecook.net/projects/eximstate/ |
bdbabb7d | 17 | BuildRequires: ncurses-devel |
454a9d80 | 18 | BuildRequires: rpmbuild(macros) >= 1.268 |
1a290dae | 19 | BuildRequires: rrdtool-devel >= 1.2.10 |
02b7497b | 20 | Requires(post,preun): /sbin/chkconfig |
bdbabb7d AM |
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 | ||
fa4a4908 | 35 | %description -l pl.UTF-8 |
8176275e | 36 | eximstate to klient/serwer do monitorowania instalacji Exima. Klienty |
fa4a4908 JR |
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 | |
8176275e | 42 | stworzenia graficznej reprezentacji danych. |
bdbabb7d AM |
43 | |
44 | %package client | |
af401bd6 | 45 | Summary: eximstate client |
c27d21da | 46 | Summary(pl.UTF-8): Klient eximstate |
af401bd6 | 47 | Group: Networking |
02b7497b | 48 | Requires(post,preun): /sbin/chkconfig |
af401bd6 | 49 | Requires: exim >= 3.0.0 |
861fc3db | 50 | Requires: rc-scripts |
bdbabb7d AM |
51 | |
52 | %description client | |
53 | eximstate is a server/client project for monitoring a number of Exim | |
8176275e | 54 | installations. This package contains client. |
bdbabb7d | 55 | |
fa4a4908 | 56 | %description client -l pl.UTF-8 |
8176275e | 57 | eximstate to klient/serwer do monitorowania instalacji Exima. Ten |
58 | pakiet zawiera klienta. | |
bdbabb7d AM |
59 | |
60 | %prep | |
61 | %setup -q | |
62 | %patch0 -p1 | |
63 | ||
64 | %build | |
65 | %configure \ | |
861fc3db | 66 | CPPFLAGS="-I/usr/include/ncurses" \ |
bdbabb7d AM |
67 | --with-rrdtool=%{_prefix} |
68 | %{__make} | |
69 | ||
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
bf24485c | 72 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_localstatedir}} |
bdbabb7d AM |
73 | |
74 | %{__make} install \ | |
75 | DESTDIR=$RPM_BUILD_ROOT | |
76 | ||
77 | cp $RPM_BUILD_ROOT%{_sbindir}/graphrrd.sh . | |
5ab63431 | 78 | sed -e 's#%{_prefix}/local/apache/htdocs/#/home/services/httpd/html/%{name}/#g' graphrrd.sh \ |
bdbabb7d AM |
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 | ||
02b7497b JB |
86 | %clean |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
bdbabb7d AM |
89 | %post |
90 | /sbin/chkconfig --add %{name}d | |
454a9d80 ER |
91 | if [ "$1" = 1 ]; then |
92 | echo "Run \"%{_sbindir}/makenewrrd.sh <host>\" for each your monitored host." | |
bdbabb7d | 93 | fi |
454a9d80 | 94 | %service %{name}d restart "%{name}d daemon" |
bdbabb7d AM |
95 | |
96 | %preun | |
454a9d80 ER |
97 | if [ "$1" = "0" ]; then |
98 | %service %{name}d stop | |
99 | /sbin/chkconfig --del %{name}d | |
bdbabb7d | 100 | fi |
bdbabb7d AM |
101 | |
102 | %post client | |
103 | /sbin/chkconfig --add %{name} | |
454a9d80 | 104 | %service %{name} restart "%{name} daemon" |
bdbabb7d AM |
105 | |
106 | %preun client | |
454a9d80 | 107 | if [ "$1" = "0" ]; then |
454a9d80 ER |
108 | %service %{name} stop |
109 | /sbin/chkconfig --del %{name} | |
bdbabb7d | 110 | fi |
bdbabb7d | 111 | |
bdbabb7d AM |
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} |