]>
Commit | Line | Data |
---|---|---|
ba69b208 | 1 | Summary: FreePBX - Asterisk Management Portal (AMP) |
7c4fe11f | 2 | Summary(pl): FreePBX - interfejs WWW do Asteriska |
ba69b208 MWP |
3 | Name: freepbx |
4 | Version: 2.0.1 | |
5 | Release: 0.1 | |
8031f0b3 | 6 | License: GPL |
ba69b208 MWP |
7 | Group: Applications |
8 | Source0: http://dl.sourceforge.net/amportal/%{name}-%{version}.tar.gz | |
9 | # Source0-md5: aa100b6928a3e1a61603fb969485381a | |
10 | URL: http://www.coalescentsystems.ca/ | |
8031f0b3 MWP |
11 | BuildRequires: rpmbuild(macros) >= 1.228 |
12 | Requires(post,preun): /sbin/chkconfig | |
13 | #Requires: Asterisk >= 1.2 | |
ba69b208 MWP |
14 | Requires: php-program |
15 | Requires: php-pear-DB | |
16 | Requires: php-pcre | |
17 | Requires: libxml2 | |
18 | Requires: libtiff | |
19 | Requires: lame | |
20 | ||
21 | #Requires: httpd | |
22 | #Requires: Apache2 | |
23 | #Requires: mysql-client | |
24 | #Requires: mysql | |
25 | ||
26 | Requires: php-mysql | |
27 | Requires: php-gettext | |
28 | Requires: php-posix | |
29 | Requires: php-gd | |
30 | Requires: openssl | |
31 | Requires: perl | |
32 | Requires: perl-CPAN | |
33 | Requires: bison | |
34 | Requires: ncurses | |
35 | Requires: audiofile | |
36 | Requires: curl | |
37 | Requires: sox | |
38 | Requires: perl-Net-Telnet | |
39 | Requires: perl-IPC-Signal | |
40 | Requires: perl-Proc-WaitStat | |
41 | Requires: asterisk-perl | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | %description | |
45 | Coalescent Systems Inc. launched the freePBX (formerly Asterisk | |
46 | Management Portal) project to bring together best-of-breed | |
47 | applications to produce a standardized implementation of Asterisk | |
48 | complete with web-based administrative interface. | |
49 | ||
50 | %description -l pl | |
51 | ||
52 | %prep | |
53 | %setup -q | |
54 | #%patch0 -p1 | |
8031f0b3 | 55 | find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,\r$,,' |
ba69b208 MWP |
56 | |
57 | %build | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | install -d $RPM_BUILD_ROOT | |
63 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{cgi-bin,agi-bin,astetc,bin,htdocs,htdocs_panel,mohmp3,sbin,sounds} | |
8031f0b3 MWP |
64 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d |
65 | install -d $RPM_BUILD_ROOT%{_bindir} | |
ba69b208 MWP |
66 | |
67 | cd ./amp_conf | |
68 | cp -R htdocs/* $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs | |
69 | install cgi-bin/* $RPM_BUILD_ROOT%{_datadir}/%{name}/cgi-bin | |
70 | install agi-bin/* $RPM_BUILD_ROOT%{_datadir}/%{name}/agi-bin | |
71 | install bin/* $RPM_BUILD_ROOT%{_datadir}/%{name}/bin | |
72 | install mohmp3/* $RPM_BUILD_ROOT%{_datadir}/%{name}/mohmp3 | |
73 | install sounds/* $RPM_BUILD_ROOT%{_datadir}/%{name}/sounds | |
74 | ||
8031f0b3 MWP |
75 | #install init/op_panel_redhat.sh $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name} |
76 | #install op_server.pl $RPM_BUILD_ROOT%{_bindir} | |
ba69b208 MWP |
77 | #TODO |
78 | #htdocs_panel | |
79 | #sbin | |
80 | #astetc | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
8031f0b3 MWP |
85 | %post |
86 | /sbin/chkconfig --add %{name} | |
87 | %service %{name} restart | |
88 | ||
89 | %preun | |
90 | if [ "$1" = "0" ]; then | |
91 | %service -q %{name} stop | |
92 | /sbin/chkconfig --del %{name} | |
93 | fi | |
ba69b208 MWP |
94 | |
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | #%doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO | |
8031f0b3 MWP |
98 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
99 | #%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
100 | %dir %{_sysconfdir} | |
101 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/* | |
102 | %attr(755,root,root) %{_bindir}/* | |
103 | %{_datadir}/%{name} |