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