]> git.pld-linux.org Git - packages/asterisk-stat.git/blob - asterisk-stat.spec
- cleanup
[packages/asterisk-stat.git] / asterisk-stat.spec
1 # TODO
2 # - remove jgraph from source
3 # - license
4
5 %define         srcversion      2_0_1
6 Summary:        Asterisk-Stat: CDR Analyser
7 Summary(pl):    Asterisk-Stat: Analizator CDR
8 Name:           asterisk-stat
9 Version:        2.0.1
10 Release:        0.1
11 License:        ? (contains Freeware, LGPL, QPL parts)
12 Group:          Applications/WWW
13 Source0:        http://areski.net/asterisk-stat-v2/%{name}-v%{srcversion}.tar.gz
14 # Source0-md5:  aad3fe2f9826e8d63dfc9bdea2315d4a
15 Source1:        %{name}.conf
16 Source2:        %{name}-config.php
17 Patch0:         %{name}-config.patch
18 URL:            http://areski.net/asterisk-stat-v2/about.php
19 BuildRequires:  rpm-perlprov
20 Requires:       %{name}(DB_Driver) = %{version}-%{release}
21 Requires:       jpgraph
22 Requires:       php
23 Requires:       php-cli
24 Requires:       php-gd
25 Requires:       webapps
26 Requires:       webserver
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _webapps        /etc/webapps
31 %define         _webapp         %{name}
32 %define         _webappdir      %{_webapps}/%{_webapp}
33 %define         _appdir         %{_datadir}/%{_webapp}
34
35 %description
36 Asterisk-Stat is providing different reports & Graph to allow the
37 Asterisk-admin to analyse quickly and easily the traffic on their
38 Asterisk server. All the graphic & reports are based over the CDR
39 database.
40
41 %description -l pl
42 Asterisk-Stat udostêpnia ró¿ne raporty i wykresy pozwalaj±ce
43 administratorowi Asteriska szybko i ³atwo przeanalizowaæ ruch na
44 serwerze Asteriska. Wszystkie wykresy i raporty s± oparte na bazie
45 danych CDR.
46
47 %package db-mysql
48 Summary:        Asterisk-stat DB Driver for MySQL
49 Summary(pl):    Sterownik bazy danych MySQL dla Asterisk-stat
50 Group:          Applications/WWW
51 Requires:       php-mysql < 4:5.0.0
52 Provides:       %{name}(DB_Driver) = %{version}-%{release}
53
54 %description db-mysql
55 This virtual package provides MySQL database backend for Asterisk-stat.
56
57 %description db-mysql -l pl
58 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla
59 Asterisk-stat.
60
61 %package db-pgsql
62 Summary:        Asterisk-stat DB Driver for PostgreSQL
63 Summary(pl):    Sterownik bazy danych PostgreSQL dla Asterisk-stat
64 Group:          Applications/WWW
65 Requires:       php-pgsql < 4:5.0.0
66 Provides:       %{name}(DB_Driver) = %{version}-%{release}
67
68 %description db-pgsql
69 This virtual package provides PostgreSQL database backend for
70 Asterisk-stat.
71
72 %description db-pgsql -l pl
73 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
74 Asterisk-stat.
75
76 %prep
77 %setup -q -n %{name}-v2
78 %patch0 -p1
79
80 find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT{%{_appdir},%{_webappdir},%{_sysconfdir}/%{name}}
85
86 cp -aRf * $RPM_BUILD_ROOT%{_appdir}
87
88 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
89 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
90 install %{SOURCE2} $RPM_BUILD_ROOT%{_webappdir}/config.php
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %triggerin -- apache1
96 %webapp_register apache %{_webapp}
97
98 %triggerun -- apache1
99 %webapp_unregister apache %{_webapp}
100
101 %triggerin -- apache < 2.2.0, apache-base
102 %webapp_register httpd %{_webapp}
103
104 %triggerun -- apache < 2.2.0, apache-base
105 %webapp_unregister httpd %{_webapp}
106
107 %files
108 %defattr(644,root,root,755)
109 %doc CHANGELOG.txt
110 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/config.php
111 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
112 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
113 %{_datadir}/%{name}
114
115 %files db-mysql
116 %defattr(644,root,root,755)
117
118 %files db-pgsql
119 %defattr(644,root,root,755)
This page took 0.228874 seconds and 3 git commands to generate.