]> git.pld-linux.org Git - packages/demarc.git/blob - demarc.spec
perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
[packages/demarc.git] / demarc.spec
1 %include        /usr/lib/rpm/macros.perl
2 %define ver     1.05
3 %define subver  RC1
4 Summary:        Network monitoring program
5 Summary(pl):    Program do monitorowania sieci
6 Name:           demarc
7 Version:        %{ver}.%{subver}
8 Release:        3
9 License:        http://www.demarc.org/license/ (Free for non-commercial use)
10 Group:          Networking
11 Group(de):      Netzwerkwesen
12 Group(es):      Red
13 Group(pl):      Sieciowe
14 Group(pt_BR):   Rede
15 Source0:        http://www.demarc.org/downloads/demarc-105/%{name}-%{ver}-%{subver}.tar.gz
16 Source1:        %{name}-apache.conf
17 Source2:        %{name}.init
18 Source3:        %{name}.cron
19 Patch0:         %{name}-config.patch
20 Patch1:         %{name}-whois-fix.patch
21 URL:            http://www.demarc.org/
22 BuildRequires:  rpm-perlprov >= 4.0
23 BuildRequires:  perl >= 5.6
24 BuildRequires:  perl-CGI
25 BuildRequires:  perl-DBI
26 BuildRequires:  perl-Msql-Mysql-modules
27 BuildRequires:  perl-Digest-MD5
28 # BuildRequires:  perl(Apache::DBI)  (what package? FIXME)
29 Requires:       apache
30 Requires:       /etc/cron.d
31 Prereq:         rc-scripts
32 Prereq:         /sbin/chkconfig
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define         _bindir         %{_sbindir}
37
38 %description
39 DEMARC is an all-inclusive network monitoring program that allows you
40 to monitor an entire network of servers from one powerful web
41 interface.
42
43 Instead of having one program perform file integrity checks, another
44 program monitoring the connectivity and health of your network, and
45 yet another monitoring your network for intrusion detection attempts,
46 DEMARC combines all three services into one powerful client/server
47 program. Not only can you monitor the status of the different machines
48 in your network, but you can also respond to changes in your network
49 all from one centralized location.
50
51 %description -l pl
52 DEMARC to kompletny system monitorowania sieci pozwalaj±cy monitorowaæ
53 ca³± sieæ serwerów z jednego interfejsu www.
54
55 Zamiast posiadaæ jeden program sprawdzaj±cy integralno¶æ plików, inny
56 program monitoruj±cy po³±czenia i stan Twojej sieci, i jeszcze jeden
57 program monitoruj±cy sieæ w celach detekcji intruzów wystarczy DEMARC
58 ³±cz±cy w sobie te trzy us³ugi w jednym programie klient/serwer. Nie
59 tylko mo¿esz monitorowaæ stan ró¿nych maszyn w Twojej sieci ale tak¿e
60 mo¿esz reagowaæ na zmiany z jednej centralnej lokalizacji.
61
62 %package client
63 Summary:        Network monitoring program - client
64 Summary(pl):    Program do monitorowania sieci - klient
65 Requires:       snort(mysql) >= 1.8.1
66 Group:          Networking
67 Group(de):      Netzwerkwesen
68 Group(es):      Red
69 Group(pl):      Sieciowe
70 Group(pt_BR):   Rede
71
72 %description client
73 DEMARC is an all-inclusive network monitoring program that allows you
74 to monitor an entire network of servers from one powerful web
75 interface.
76
77 This is client program which should be installed on all monitored
78 servers.
79
80 %description -l pl client
81 DEMARC to kompletny system monitorowania sieci pozwalaj±cy monitorowaæ
82 ca³± sieæ serwerów z jednego interfejsu www.
83
84 To jest program kliencki, który powinien byæ zainstalowany na
85 wszystkich monitorowanych serwerach.
86
87 %prep
88 %setup -q -n %{name}-%{ver}-%{subver}
89 %patch0 -p1
90 %patch1 -p1
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,demarcd,httpd}
95 install -d $RPM_BUILD_ROOT%{_sbindir}
96 install -d $RPM_BUILD_ROOT%{_datadir}/demarc/{images,cgi}
97 install -d $RPM_BUILD_ROOT/%{_var}/lib/demarcd
98
99 install %{SOURCE1}              $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
100 install %{SOURCE2}              $RPM_BUILD_ROOT/etc/rc.d/init.d/demarcd
101 install %{SOURCE3}              $RPM_BUILD_ROOT/etc/cron.d/%{name}
102 install bin/demarcd             $RPM_BUILD_ROOT%{_sbindir}
103 install conf/*                  $RPM_BUILD_ROOT/etc/demarcd
104 cp -ar  cgi images              $RPM_BUILD_ROOT%{_datadir}/demarc
105 install install/{c*,d*,p*}      $RPM_BUILD_ROOT%{_datadir}/demarc
106
107 gzip -9nf install/{CHAN*,INS*,LIC*}
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post
113 echo 'Remember to add "Include demarc.conf" to httpd.conf.'
114
115 %post client
116 if [ "$1" = "1" ] ; then
117         touch /var/log/demarcd && chmod 750 /var/log/demarcd
118 fi
119 /sbin/chkconfig --add demarcd
120 if [ -f /var/lock/subsys/demarcd ]; then
121         /etc/rc.d/init.d/demarcd restart 1>&2
122 else
123         echo "Run \"%{_sbindir}/demarcd -I\" to install new snort sensor and then"
124         echo "run \"/etc/rc.d/init.d/demarcd start\" to start demarcd daemon."
125         echo "Note that in most cases there is no need to start \"snort\" as"
126         echo "separate daemon, so turn it off using \"/sbin/chkconfig snort off\"."
127 fi
128
129
130 %preun client
131 if [ "$1" = "0" ] ; then
132         if [ -f /var/lock/subsys/demarcd ]; then
133                 /etc/rc.d/init.d/demarcd stop 1>&2
134         fi
135         /sbin/chkconfig --del demarcd
136 fi
137
138 %files
139 %defattr(644,root,root,755)
140 %doc install/*.gz
141 %dir %{_datadir}/demarc
142 %{_datadir}/demarc/create_mysql_demarc
143 %{_datadir}/demarc/db_patch_queries
144 %attr(755,root,root) %{_datadir}/demarc/*.pl
145
146 %dir %{_datadir}/demarc/cgi
147 %{_datadir}/demarc/cgi/StaticServices.pm
148 %attr(640,root,http) %{_datadir}/demarc/cgi/DEMARC_config.pm
149 %attr(755,root,root) %{_datadir}/demarc/cgi/demarc
150
151 %dir %{_datadir}/demarc/cgi/templates
152 %{_datadir}/demarc/cgi/templates/*
153
154 %dir %{_datadir}/demarc/images
155 %{_datadir}/demarc/images/*
156
157 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/httpd/demarc.conf
158
159 %files client
160 %defattr(644,root,root,755)
161 %attr(754,root,root) /etc/rc.d/init.d/demarcd
162 %attr(755,root,root) %{_sbindir}/demarcd
163 %attr(750,root,root) %dir /etc/demarcd
164 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/demarcd/*.conf
165 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/demarcd/*.cmds
166 %attr(640,root,root) %config /etc/cron.d/%{name}
167 %attr(750,root,root) %{_var}/lib/demarcd
This page took 0.056284 seconds and 3 git commands to generate.