]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - proper webapps integration: make config NOT accessible from web | |
3 | Summary: Analysis Console for Incident Databases | |
4 | Summary(pl.UTF-8): Konsola do analizy baz danych o incydentach (ACID) | |
5 | Name: acid | |
6 | Version: 0.9.6b23 | |
7 | Release: 10 | |
8 | License: GPL/PHP | |
9 | Group: Applications/WWW | |
10 | Source0: http://acidlab.sourceforge.net/%{name}-%{version}.tar.gz | |
11 | # Source0-md5: d8c49614393fa05ac140de349f57e438 | |
12 | Source1: %{name}.conf | |
13 | Patch0: %{name}-config.patch | |
14 | URL: http://acidlab.sourceforge.net/ | |
15 | BuildRequires: rpmbuild(macros) >= 1.461 | |
16 | Requires: %{name}(DB_Driver) = %{version}-%{release} | |
17 | Requires: adodb >= 4.67-1.17 | |
18 | Requires: jpgraph >= 1.8 | |
19 | Requires: php(gd) | |
20 | Requires: webapps | |
21 | Requires: webserver(php) < 5.0.0 | |
22 | BuildArch: noarch | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %define _appdir %{_datadir}/%{name} | |
26 | %define _webapps /etc/webapps | |
27 | %define _webapp %{name} | |
28 | %define _sysconfdir %{_webapps}/%{_webapp} | |
29 | ||
30 | %description | |
31 | ACID is a PHP-based analysis engine to search and process a database | |
32 | of security incidents generated by the security-related software such | |
33 | as the NIDS Snort. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | ACID jest bazującym na PHP silnikiem do przeszukiwania i analizy baz | |
37 | danych zawierających informacje o incydentach bezpieczeństwa | |
38 | wygenerowanych przez oprogramowanie takie jak NIDS Snort. | |
39 | ||
40 | %package db-mysql | |
41 | Summary: ACID DB Driver for MySQL | |
42 | Summary(pl.UTF-8): Sterownik bazy danych MySQL dla ACID | |
43 | Group: Applications/WWW | |
44 | Requires: php(mysql) | |
45 | Provides: %{name}(DB_Driver) = %{version}-%{release} | |
46 | ||
47 | %description db-mysql | |
48 | This virtual package provides MySQL database backend for ACID. | |
49 | ||
50 | %description db-mysql -l pl.UTF-8 | |
51 | Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla ACID. | |
52 | ||
53 | %package db-pgsql | |
54 | Summary: ACID DB Driver for PostgreSQL | |
55 | Summary(pl.UTF-8): Sterownik bazy danych PostgreSQL dla ACID | |
56 | Group: Applications/WWW | |
57 | Requires: php(pgsql) | |
58 | Provides: %{name}(DB_Driver) = %{version}-%{release} | |
59 | ||
60 | %description db-pgsql | |
61 | This virtual package provides PostgreSQL database backend for ACID. | |
62 | ||
63 | %description db-pgsql -l pl.UTF-8 | |
64 | Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla | |
65 | ACID. | |
66 | ||
67 | %prep | |
68 | %setup -q -n %{name} | |
69 | %patch0 -p1 | |
70 | ||
71 | find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}} | |
76 | ||
77 | install acid* index.html $RPM_BUILD_ROOT%{_appdir} | |
78 | # TODO: patch source instead | |
79 | mv -f $RPM_BUILD_ROOT%{_appdir}/acid_conf.php $RPM_BUILD_ROOT%{_sysconfdir} | |
80 | ln -sf %{_sysconfdir}/acid_conf.php $RPM_BUILD_ROOT%{_appdir}/acid_conf.php | |
81 | ||
82 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
83 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
84 | ||
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
89 | %webapp_register apache %{_webapp} | |
90 | ||
91 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
92 | %webapp_unregister apache %{_webapp} | |
93 | ||
94 | %triggerin -- apache < 2.2.0, apache-base | |
95 | %webapp_register httpd %{_webapp} | |
96 | ||
97 | %triggerun -- apache < 2.2.0, apache-base | |
98 | %webapp_unregister httpd %{_webapp} | |
99 | ||
100 | %triggerpostun -- %{name} < 0.9.6b23-5.2 | |
101 | %{__sed} -i -e 's,%{php_pear_dir}/adodb,%{php_data_dir}/adodb,' %{_sysconfdir}/acid_conf.php | |
102 | ||
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %doc create* CHANGELOG CREDITS README TODO | |
106 | %dir %attr(750,root,http) %{_sysconfdir} | |
107 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
108 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
109 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acid_conf.php | |
110 | %{_appdir} | |
111 | ||
112 | %files db-mysql | |
113 | %defattr(644,root,root,755) | |
114 | ||
115 | %files db-pgsql | |
116 | %defattr(644,root,root,755) |