]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - integrate pld webapps framework | |
3 | %define ver 1.05 | |
4 | %define subver RC1 | |
5 | Summary: Network monitoring program | |
6 | Summary(pl.UTF-8): Program do monitorowania sieci | |
7 | Name: demarc | |
8 | Version: %{ver}.%{subver} | |
9 | Release: 4 | |
10 | License: http://www.demarc.org/license/ (Free for non-commercial use) | |
11 | Group: Networking | |
12 | Source0: http://www.demarc.org/downloads/demarc-105/%{name}-%{ver}-%{subver}.tar.gz | |
13 | # Source0-md5: adf1550b8e7a4936c4b37ac214704f27 | |
14 | Source1: %{name}-apache.conf | |
15 | Source2: %{name}.init | |
16 | Source3: %{name}.cron | |
17 | Patch0: %{name}-config.patch | |
18 | Patch1: %{name}-whois-fix.patch | |
19 | URL: http://www.demarc.org/ | |
20 | BuildRequires: perl-Apache-DBI | |
21 | BuildRequires: perl-CGI | |
22 | BuildRequires: perl-DBI | |
23 | BuildRequires: perl-Digest-MD5 | |
24 | BuildRequires: perl-Msql-Mysql-modules | |
25 | BuildRequires: perl-devel >= 1:5.6 | |
26 | BuildRequires: rpm-perlprov >= 4.1-13 | |
27 | BuildRequires: rpmbuild(macros) >= 1.228 | |
28 | Requires(post,preun): /sbin/chkconfig | |
29 | Requires: crondaemon | |
30 | Requires: rc-scripts | |
31 | Requires: webserver = apache | |
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.UTF-8 | |
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.UTF-8): Program do monitorowania sieci - klient | |
64 | Group: Networking | |
65 | Requires: snort(mysql) >= 1.8.1 | |
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 | |
73 | servers. | |
74 | ||
75 | %description client -l pl.UTF-8 | |
76 | DEMARC to kompletny system monitorowania sieci pozwalający monitorować | |
77 | całą sieć serwerów z jednego interfejsu WWW. | |
78 | ||
79 | To jest program kliencki, który powinien być zainstalowany na | |
80 | wszystkich monitorowanych serwerach. | |
81 | ||
82 | %prep | |
83 | %setup -q -n %{name}-%{ver}-%{subver} | |
84 | %patch0 -p1 | |
85 | %patch1 -p1 | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d,demarcd,httpd} \ | |
90 | $RPM_BUILD_ROOT{%{_sbindir},%{_datadir}/demarc/{images,cgi}} \ | |
91 | $RPM_BUILD_ROOT%{_var}/lib/demarcd | |
92 | ||
93 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/%{name}.conf | |
94 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/demarcd | |
95 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.d/%{name} | |
96 | install -p bin/demarcd $RPM_BUILD_ROOT%{_sbindir} | |
97 | cp -p conf/* $RPM_BUILD_ROOT%{_sysconfdir}/demarcd | |
98 | cp -a cgi images $RPM_BUILD_ROOT%{_datadir}/demarc | |
99 | cp -p install/{c*,d*,p*} $RPM_BUILD_ROOT%{_datadir}/demarc | |
100 | ||
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %post | |
105 | echo 'Remember to add "Include demarc.conf" to httpd.conf.' | |
106 | ||
107 | %post client | |
108 | if [ "$1" = "1" ] ; then | |
109 | touch /var/log/demarcd && chmod 750 /var/log/demarcd | |
110 | fi | |
111 | /sbin/chkconfig --add demarcd | |
112 | %service demarcd restart | |
113 | %banner -e -o %{name} <<EOF | |
114 | ||
115 | Run "%{_sbindir}/demarcd -I" to install new snort sensor and then | |
116 | run "service demarcd start" to start demarcd daemon. | |
117 | ||
118 | Note that in most cases there is no need to start "snort" as | |
119 | separate daemon, so turn it off using "chkconfig snort off". | |
120 | EOF | |
121 | ||
122 | %preun client | |
123 | if [ "$1" = "0" ] ; then | |
124 | %service demarcd stop | |
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 md5 mtime size) %{_sysconfdir}/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 %{_sysconfdir}/demarcd | |
154 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/demarcd/*.conf | |
155 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/demarcd/*.cmds | |
156 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name} | |
157 | %attr(750,root,root) %{_var}/lib/demarcd |