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