]> git.pld-linux.org Git - packages/asterisk-stat.git/blob - asterisk-stat.spec
6ae751f26e360cf1b5fdad78eb2d9777922f484c
[packages/asterisk-stat.git] / asterisk-stat.spec
1 #
2 #TODO - webapps
3 #TODO - patch - include in /usr/share/asterisk-stat/lib/defines.php and add file in SOURCES
4 #TODO - remove jgroph from source
5 #TODO - Subpackage for databases?
6 #TODO - license
7
8 %define         srcversion      2_0_1
9
10 Summary:        Asterisk-Stat: CDR Analyser
11 Summary(pl):    Asterisk-Stat: Analizator CDR
12 Name:           asterisk-stat
13 Version:        2.0.1
14 Release:        0.1
15 License:        -
16 Group:          Applications/WWW
17 Source0:        http://areski.net/%{name}-v2/%{name}-v%{srcversion}.tar.gz
18 # Source0-md5:  aad3fe2f9826e8d63dfc9bdea2315d4a
19 #Source1:       %{name}.conf
20 #Source2:       %{name}-config.php
21 #Patch0:        %{name}-config.patch
22 URL:            http://areski.net/asterisk-stat-v2/about.php    
23 BuildRequires:  rpm-perlprov
24 Requires:       php
25 Requires:       php-cli
26 Requires:       php-gd
27 Requires:       php-mysql
28 Requires:       webserver
29 Requires:       webapps
30 Requires:       jpgraph
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         _webapps        /etc/webapps
35 %define         _webapp         %{name}
36 %define         _webappdir      %{_webapps}/%{_webapp}
37 %define         _appdir         %{_datadir}/%{_webapp}
38
39 %description
40 Asterisk-Stat is providing different reports & Graph to allow
41 the Asterisk-admin to analyse quickly and easily the traffic on their Asterisk server.
42 All the graphic & reports are based over the CDR database.
43
44 %description -l pl
45
46 %prep
47 %setup -q -n %{name}-v2
48 #%patch0 -p1
49
50 find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
51
52 %build
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_appdir},%{_webappdir},%{_sysconfdir}/%{name}}
57
58 cp -aRf * $RPM_BUILD_ROOT%{_appdir}
59
60 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
61 install %{SOURCE1} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
62 install %{SOURCE2} $RPM_BUILD_ROOT%{sysconfdir}/%{name}/
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %triggerin -- apache1
68 %webapp_register apache %{_webapp}
69
70 %triggerun -- apache1
71 %webapp_unregister apache %{_webapp}
72
73 %triggerin -- apache < 2.2.0, apache-base
74 %webapp_register httpd %{_webapp}
75
76 %triggerun -- apache < 2.2.0, apache-base
77 %webapp_unregister httpd %{_webapp}
78
79 %files
80 %defattr(644,root,root,755)
81 %doc CHANGELOG.txt
82 #%%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-config.php
83 %{_datadir}/%{name}
This page took 0.145308 seconds and 2 git commands to generate.