]> git.pld-linux.org Git - packages/asterisk-stat.git/blob - asterisk-stat.spec
8498c43486bf8e08cabd5132e12803e74368690a
[packages/asterisk-stat.git] / asterisk-stat.spec
1 # TODO
2 # - remove jgraph from source
3 # - Subpackage for databases?
4 # - license
5 # - move application config to webapps dir (redefine _sysconfdir to webappdir)
6
7 %define         srcversion      2_0_1
8 Summary:        Asterisk-Stat: CDR Analyser
9 Summary(pl):    Asterisk-Stat: Analizator CDR
10 Name:           asterisk-stat
11 Version:        2.0.1
12 Release:        0.1
13 License:        ? (contains Freeware, LGPL, QPL parts)
14 Group:          Applications/WWW
15 Source0:        http://areski.net/asterisk-stat-v2/%{name}-v%{srcversion}.tar.gz
16 # Source0-md5:  aad3fe2f9826e8d63dfc9bdea2315d4a
17 Source1:        %{name}.conf
18 Source2:        %{name}-config.php
19 Patch0:         %{name}-config.patch
20 URL:            http://areski.net/asterisk-stat-v2/about.php
21 BuildRequires:  rpm-perlprov
22 Requires:       jpgraph
23 Requires:       php
24 Requires:       php-cli
25 Requires:       php-gd
26 Requires:       php-mysql
27 Requires:       webapps
28 Requires:       webserver
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _webapps        /etc/webapps
33 %define         _webapp         %{name}
34 %define         _webappdir      %{_webapps}/%{_webapp}
35 %define         _appdir         %{_datadir}/%{_webapp}
36
37 %description
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
41 database.
42
43 %description -l pl
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
47 danych CDR.
48
49 %prep
50 %setup -q -n %{name}-v2
51 %patch0 -p1
52
53 find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_appdir},%{_webappdir},%{_sysconfdir}/%{name}}
58
59 cp -aRf * $RPM_BUILD_ROOT%{_appdir}
60
61 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
62 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
63 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.php
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %triggerin -- apache1
69 %webapp_register apache %{_webapp}
70
71 %triggerun -- apache1
72 %webapp_unregister apache %{_webapp}
73
74 %triggerin -- apache < 2.2.0, apache-base
75 %webapp_register httpd %{_webapp}
76
77 %triggerun -- apache < 2.2.0, apache-base
78 %webapp_unregister httpd %{_webapp}
79
80 %files
81 %defattr(644,root,root,755)
82 %doc CHANGELOG.txt
83 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/config.php
84 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
85 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
86 %{_datadir}/%{name}
This page took 0.05894 seconds and 2 git commands to generate.