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