]>
Commit | Line | Data |
---|---|---|
1 | %define timestamp 20060407-2351 | |
2 | Summary: Asterisk's manager interface proxy | |
3 | Summary(pl.UTF-8): Proxy do interfeksu zarządzającego Asteriska | |
4 | Name: astmanproxy | |
5 | Version: 1.20 | |
6 | Release: 0.1 | |
7 | License: GPL | |
8 | Group: Applications | |
9 | Source0: http://www.popvox.com/astmanproxy/%{name}-%{version}-%{timestamp}.tgz | |
10 | # Source0-md5: 2489f3885436391d75342cf58210da50 | |
11 | Source1: %{name}.init | |
12 | Source2: %{name}.sysconfig | |
13 | Patch0: %{name}-rpm.patch | |
14 | URL: http://www.voip-info.org/tiki-index.php?page=AstManProxy | |
15 | BuildRequires: rpmbuild(macros) >= 1.228 | |
16 | Requires(post,preun): /sbin/chkconfig | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %description | |
20 | The need for a proxy to Asterisk's manager interface has been clear; | |
21 | almost all GUIs and other interfaces to Asterisk implement a proxy of | |
22 | some kind. Why? A proxy offers: | |
23 | ||
24 | - A single persistent connection to Asterisk | |
25 | - A more secure (non-root) TCP interface | |
26 | - Ability to offer filtered input/output | |
27 | - Less connections and networking load for Asterisk | |
28 | ||
29 | %description -l pl.UTF-8 | |
30 | Potrzeba proxy dla interfejsu zarządzającego Asteriska jest jasna; | |
31 | prawie wszystkie GUI i inne interfejsy do Asteriska implementują jakiś | |
32 | rodzaj proxy. Dlaczego? Proxy oferuje: | |
33 | - pojedyncze, stałe połączenie z Asteriskiem | |
34 | - bezpieczeniejszy (nie działający z poziomu roota) interfejs TCP | |
35 | - możliwość filtrowania wejścia/wyjścia | |
36 | - mniej połączeń i obciążenia sieci dla Asteriska. | |
37 | ||
38 | %prep | |
39 | %setup -q -c | |
40 | %patch0 -p1 | |
41 | ||
42 | %build | |
43 | cd %{version} | |
44 | %{__make} astmanproxy \ | |
45 | rpmcflags="%{rpmcflags}" \ | |
46 | rpmldflags="%{rpmldflags}" | |
47 | cp configs/* . | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig} | |
52 | ||
53 | %{__make} -C %{version} install \ | |
54 | DESTDIR=$RPM_BUILD_ROOT \ | |
55 | PREFIX=%{_prefix} \ | |
56 | LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} | |
57 | ||
58 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
59 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %post | |
65 | /sbin/chkconfig --add %{name} | |
66 | %service %{name} restart | |
67 | ||
68 | %preun | |
69 | if [ "$1" = "0" ]; then | |
70 | %service -q %{name} stop | |
71 | /sbin/chkconfig --del %{name} | |
72 | fi | |
73 | ||
74 | %files | |
75 | %defattr(644,root,root,755) | |
76 | %doc %{version}/{README,TODO,VERSIONS} | |
77 | %attr(755,root,root) %{_sbindir}/* | |
78 | %dir %{_libdir}/%{name} | |
79 | %attr(755,root,root) %{_libdir}/%{name}/* | |
80 | %dir %{_sysconfdir}/asterisk | |
81 | %{_sysconfdir}/asterisk/* | |
82 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
83 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |