]> git.pld-linux.org Git - packages/tenshi.git/blob - tenshi.spec
- release 2
[packages/tenshi.git] / tenshi.spec
1 %include        /usr/lib/rpm/macros.perl
2 Summary:        Log parsing and notification program
3 Summary(pl.UTF-8):      Program do analizy logów i powiadamiania
4 Name:           tenshi
5 Version:        0.10
6 Release:        2
7 License:        GPL
8 Group:          Applications/System
9 Source0:        http://dev.inversepath.com/tenshi/%{name}-%{version}.tar.gz
10 # Source0-md5:  cc6abbcd1bf563fa31771b7d4b05fe65
11 Source1:        %{name}.init
12 Patch0:         %{name}-root.patch
13 Patch1:         %{name}-config.patch
14 URL:            http://dev.inversepath.com/trac/tenshi
15 BuildRequires:  rpm-perlprov
16 BuildRequires:  rpmbuild(macros) >= 1.228
17 Requires(post,preun):   /sbin/chkconfig
18 Requires(post,preun):   rc-scripts
19 Requires(postun):       /usr/sbin/groupdel
20 Requires(postun):       /usr/sbin/userdel
21 Requires(pre):  /bin/id
22 Requires(pre):  /usr/bin/getgid
23 Requires(pre):  /usr/sbin/groupadd
24 Requires(pre):  /usr/sbin/useradd
25 Obsoletes:      wasabi
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _sysconfdir     /etc/tenshi
30
31 %description
32 Tenshi is a log monitoring program, designed to watch one or more log
33 files for lines matching user defined regular expressions and report
34 on the matches. The regular expressions are assigned to queues which
35 have an alert interval and a list of mail recipients.
36
37 Queues can be set to send a notification as soon as there is a log
38 line assigned to it, or to send periodic reports.
39
40 Additionally, uninteresting fields in the log lines (such as PID
41 numbers) can be masked with the standard regular expression grouping
42 operators ( ). This allows cleaner and more readable reports. All
43 reports are separated by hostname and all messages are condensed when
44 possible.
45
46 %description -l pl.UTF-8
47 Tenshi to program do monitorowania logów zaprojektowany do oglądania
48 jednego lub większej liczby plików logów pod kątem linii pasujących do
49 zdefiniowanych przez użytkownika wyrażeń regularnych i raportowania
50 tych dopasowań. Wyrażenia regularne są przypisywane do kolejek
51 mających częstotliwość alarmowania i listę adresatów pocztowych.
52
53 Kolejki mogą być konfigurowane do wysyłania powiadomień zaraz po
54 napotkaniu linii w logu lub wysyłania regularnych raportów.
55
56 Dodatkowo nieciekawe pola z linii logów (takie jak numery procesów)
57 mogą być pokrywane standardowymi operatorami grupowania wyrażeń
58 regularnych ( ). Daje to bardziej przejrzyste i bardziej czytelne
59 raporty. Wszystkie raporty są oddzielane nazwą hosta, a wszystkie
60 wiadomości są tak skondensowane, jak to tylko możliwe.
61
62 %prep
63 %setup -q
64 %patch0 -p1
65 %patch1 -p1
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_mandir}/man8,/var/run/tenshi}
70
71 %{__make} install \
72         DESTDIR=$RPM_BUILD_ROOT
73
74 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %pre
80 %groupadd -g 175 %{name}
81 %useradd -u 175 -d %{_sysconfdir} -g %{name} -c "Tenshi User" %{name}
82
83 %post
84 /sbin/chkconfig --add %{name}
85 %service %{name} restart
86
87 %preun
88 if [ "$1" = "0" ]; then
89         %service -q %{name} stop
90         /sbin/chkconfig --del %{name}
91 fi
92
93 %postun
94 if [ "$1" = "0" ]; then
95         %userremove %{name}
96         %groupremove %{name}
97 fi
98
99 %files
100 %defattr(644,root,root,755)
101 %doc CREDITS Changelog README tenshi.conf
102 %attr(755,root,root) %{_sbindir}/*
103 %attr(750,root,tenshi) %dir %{_sysconfdir}
104 %attr(640,root,tenshi) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
105 %attr(754,root,root) /etc/rc.d/init.d/%{name}
106 %{_mandir}/man8/*
107 %dir %attr(775,root,tenshi) /var/run/tenshi
This page took 0.094152 seconds and 4 git commands to generate.