]> git.pld-linux.org Git - packages/demarc.git/blob - demarc.spec
4550e71900119b5108d209d0766ef3b6c4e998b4
[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 # Source0-md5:  adf1550b8e7a4936c4b37ac214704f27
13 Source1:        %{name}-apache.conf
14 Source2:        %{name}.init
15 Source3:        %{name}.cron
16 Patch0:         %{name}-config.patch
17 Patch1:         %{name}-whois-fix.patch
18 URL:            http://www.demarc.org/
19 BuildRequires:  rpm-perlprov >= 4.0
20 BuildRequires:  perl >= 5.6
21 BuildRequires:  perl-CGI
22 BuildRequires:  perl-DBI
23 BuildRequires:  perl-Msql-Mysql-modules
24 BuildRequires:  perl-Digest-MD5
25 # BuildRequires:        perl(Apache::DBI)  (what package? FIXME)
26 PreReq:         rc-scripts
27 Requires(post,preun):   /sbin/chkconfig
28 Requires:       apache
29 Requires:       /etc/cron.d
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         _bindir         %{_sbindir}
34
35 %description
36 DEMARC is an all-inclusive network monitoring program that allows you
37 to monitor an entire network of servers from one powerful web
38 interface.
39
40 Instead of having one program perform file integrity checks, another
41 program monitoring the connectivity and health of your network, and
42 yet another monitoring your network for intrusion detection attempts,
43 DEMARC combines all three services into one powerful client/server
44 program. Not only can you monitor the status of the different machines
45 in your network, but you can also respond to changes in your network
46 all from one centralized location.
47
48 %description -l pl
49 DEMARC to kompletny system monitorowania sieci pozwalaj±cy monitorowaæ
50 ca³± sieæ serwerów z jednego interfejsu www.
51
52 Zamiast posiadaæ jeden program sprawdzaj±cy integralno¶æ plików, inny
53 program monitoruj±cy po³±czenia i stan Twojej sieci, i jeszcze jeden
54 program monitoruj±cy sieæ w celach detekcji intruzów wystarczy DEMARC
55 ³±cz±cy w sobie te trzy us³ugi w jednym programie klient/serwer. Nie
56 tylko mo¿esz monitorowaæ stan ró¿nych maszyn w Twojej sieci ale tak¿e
57 mo¿esz reagowaæ na zmiany z jednej centralnej lokalizacji.
58
59 %package client
60 Summary:        Network monitoring program - client
61 Summary(pl):    Program do monitorowania sieci - klient
62 Requires:       snort(mysql) >= 1.8.1
63 Group:          Networking
64
65 %description client
66 DEMARC is an all-inclusive network monitoring program that allows you
67 to monitor an entire network of servers from one powerful web
68 interface.
69
70 This is client program which should be installed on all monitored
71 servers.
72
73 %description client -l pl
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
78 wszystkich monitorowanych serwerach.
79
80 %prep
81 %setup -q -n %{name}-%{ver}-%{subver}
82 %patch0 -p1
83 %patch1 -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         $RPM_BUILD_ROOT{%{_sbindir},%{_datadir}/demarc/{images,cgi}} \
89         $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.056849 seconds and 2 git commands to generate.