3 %define srcversion 2_0_1
4 Summary: Asterisk-Stat: CDR Analyser
5 Summary(pl.UTF-8): Asterisk-Stat: Analizator CDR
9 License: ? (contains Freeware, LGPL, QPL parts)
10 Group: Applications/WWW
11 Source0: http://areski.net/asterisk-stat-v2/%{name}-v%{srcversion}.tar.gz
12 # Source0-md5: aad3fe2f9826e8d63dfc9bdea2315d4a
14 Source2: %{name}-config.php
15 Patch0: %{name}-config.patch
16 Patch1: %{name}-jpgraph.patch
17 URL: http://areski.net/asterisk-stat-v2/about.php
18 BuildRequires: rpm-perlprov
19 BuildRequires: rpmbuild(macros) >= 1.264
20 BuildRequires: sed >= 4.0
21 Requires: %{name}(DB_Driver) = %{version}-%{release}
22 Requires: adodb >= 4.67-1.17
28 Requires: webserver(php)
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define _webapps /etc/webapps
33 %define _webapp %{name}
34 %define _sysconfdir %{_webapps}/%{_webapp}
35 %define _appdir %{_datadir}/%{_webapp}
38 Asterisk-Stat is providing different reports & Graph to allow the
39 Asterisk-admin to analyse quickly and easily the traffic on their
40 Asterisk server. All the graphic & reports are based over the CDR
43 %description -l pl.UTF-8
44 Asterisk-Stat udostępnia różne raporty i wykresy pozwalające
45 administratorowi Asteriska szybko i łatwo przeanalizować ruch na
46 serwerze Asteriska. Wszystkie wykresy i raporty są oparte na bazie
50 Summary: Asterisk-stat DB Driver for MySQL
51 Summary(pl.UTF-8): Sterownik bazy danych MySQL dla Asterisk-stat
52 Group: Applications/WWW
54 Provides: %{name}(DB_Driver) = %{version}-%{release}
57 This virtual package provides MySQL database backend for
60 %description db-mysql -l pl.UTF-8
61 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla
65 Summary: Asterisk-stat DB Driver for PostgreSQL
66 Summary(pl.UTF-8): Sterownik bazy danych PostgreSQL dla Asterisk-stat
67 Group: Applications/WWW
69 Provides: %{name}(DB_Driver) = %{version}-%{release}
72 This virtual package provides PostgreSQL database backend for
75 %description db-pgsql -l pl.UTF-8
76 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
80 %setup -q -n %{name}-v2
85 find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
90 cp -aRf * $RPM_BUILD_ROOT%{_appdir}
92 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
93 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
94 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/config.php
97 rm -rf $RPM_BUILD_ROOT
99 %triggerin -- apache1 < 1.3.37-3, apache1-base
100 %webapp_register apache %{_webapp}
102 %triggerun -- apache1 < 1.3.37-3, apache1-base
103 %webapp_unregister apache %{_webapp}
105 %triggerin -- apache < 2.2.0, apache-base
106 %webapp_register httpd %{_webapp}
108 %triggerun -- apache < 2.2.0, apache-base
109 %webapp_unregister httpd %{_webapp}
112 %defattr(644,root,root,755)
114 %dir %attr(750,root,http) %{_sysconfdir}
115 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
116 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
117 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
121 %defattr(644,root,root,755)
124 %defattr(644,root,root,755)