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