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