]>
Commit | Line | Data |
---|---|---|
04457a35 | 1 | Summary: A Web-based administration interface for powerDNS |
2 | Name: ZoneAdmin | |
d06d50f0 | 3 | Version: 0.2 |
04457a35 | 4 | Release: 0.1 |
5 | License: GPL | |
6 | Group: Applications/WWW | |
d06d50f0 SP |
7 | Source0: http://dl.sourceforge.net/zoneadmin/%{name}-%{version}-beta1.tar.gz |
8 | # Source0-md5: a848e14d947d41734d8a23d72d0196da | |
5e90a685 | 9 | Patch0: %{name}-smarty.patch |
04457a35 | 10 | URL: http://open.megabit.net/index.php?section=pro_home&project=ZoneAdmin |
11 | BuildRequires: rpmbuild(macros) >= 1.268 | |
0304c045 | 12 | Requires: Smarty >= 2.6.18-2 |
04457a35 | 13 | Requires: webapps |
0304c045 | 14 | Requires: webserver(php) |
04457a35 | 15 | %if %{with trigger} |
16 | Requires(triggerpostun): sed >= 4.0 | |
17 | %endif | |
18 | BuildArch: noarch | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define _webapps /etc/webapps | |
22 | %define _webapp %{name} | |
5e90a685 | 23 | %define _smartyplugindir /usr/share/php/Smarty/plugins |
04457a35 | 24 | %define _sysconfdir %{_webapps}/%{_webapp} |
56c886e1 | 25 | %define _zavar /var/lib/%{name} |
04457a35 | 26 | %define _appdir %{_datadir}/%{_webapp} |
27 | ||
28 | %description | |
29 | ZoneAdmin is a Web interface for the powerDNS name server using the | |
30 | MySQL backend. It allows you to manage existing zones and add, remove, | |
31 | and alter new ones, supports on-the-fly input validation, and allows | |
32 | comments per zone and per record. Furthermore, it keeps a detailed | |
33 | history of changes and allows you to temporary enable or disable zones | |
34 | without having to remove them completely. New zones can use templates | |
35 | that contain predefined records. It is designed to be used with one of | |
36 | Apache's authentication methods. | |
37 | ||
38 | %prep | |
d06d50f0 | 39 | %setup -q -n %{name}-%{version}-beta1 |
5e90a685 SP |
40 | %patch0 -p1 |
41 | ||
42 | mkdir smarty-plugins | |
04457a35 | 43 | |
44 | cat > apache.conf <<'EOF' | |
45 | Alias /%{name} %{_appdir} | |
46 | <Directory %{_appdir}> | |
47 | Allow from all | |
48 | </Directory> | |
49 | EOF | |
50 | ||
51 | rm -rf $RPM_BUILD_ROOT | |
56c886e1 | 52 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_smartyplugindir},%{_zavar}/templates_c,%{_appdir}} |
04457a35 | 53 | |
54 | install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
55 | install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
56 | install *.php $RPM_BUILD_ROOT%{_appdir} | |
57 | cp -a {contrib,img,includes,lang,templates_c,tpl} $RPM_BUILD_ROOT%{_appdir} | |
5e90a685 | 58 | cp -a includes/smarty/libs/* $RPM_BUILD_ROOT%{_smartyplugindir} |
39b738a3 SP |
59 | mv $RPM_BUILD_ROOT%{_appdir}/includes/config.php.dist $RPM_BUILD_ROOT%{_sysconfdir}/config.php |
60 | ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/includes/config.php | |
04457a35 | 61 | |
62 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
63 | %webapp_register apache %{_webapp} | |
64 | ||
65 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
66 | %webapp_unregister apache %{_webapp} | |
67 | ||
68 | %triggerin -- apache < 2.2.0, apache-base | |
69 | %webapp_register httpd %{_webapp} | |
70 | ||
71 | %triggerun -- apache < 2.2.0, apache-base | |
72 | %webapp_unregister httpd %{_webapp} | |
73 | ||
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %files | |
78 | %defattr(644,root,root,755) | |
79 | %dir %attr(750,root,http) %{_sysconfdir} | |
80 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
81 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
39b738a3 | 82 | %attr(660,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php |
04457a35 | 83 | %{_appdir}/*.php |
84 | %dir %{_appdir}/contrib | |
85 | %{_appdir}/contrib/*.php | |
86 | %{_appdir}/contrib/*.sql | |
87 | %dir %{_appdir}/img | |
88 | %{_appdir}/img/*.gif | |
89 | %{_appdir}/img/*.png | |
90 | %dir %{_appdir}/includes | |
91 | %{_appdir}/includes/*.php | |
04457a35 | 92 | %dir %{_appdir}/includes/smarty/libs/ |
93 | %{_appdir}/includes/smarty/libs/*.php | |
94 | %{_appdir}/includes/smarty/libs/*.tpl | |
95 | %dir %{_appdir}/includes/smarty/libs/internals | |
96 | %{_appdir}/includes/smarty/libs/internals/*.php | |
97 | %dir %{_appdir}/includes/smarty/libs/plugins | |
98 | %{_appdir}/includes/smarty/libs/plugins/*.php | |
99 | %dir %{_appdir}/includes/smarty_plugins | |
100 | %{_appdir}/includes/smarty_plugins/*.php | |
101 | %dir %{_appdir}/lang | |
102 | %{_appdir}/lang/*.conf | |
103 | %dir %{_appdir}/templates_c | |
104 | %dir %{_appdir}/tpl/Boxes | |
105 | %{_appdir}/tpl/Boxes/*.css | |
106 | %{_appdir}/tpl/Boxes/*.js | |
107 | %{_appdir}/tpl/Boxes/*.tpl | |
108 | %dir %{_appdir}/tpl/Boxes/img | |
109 | %{_appdir}/tpl/Boxes/img/*.jpg | |
110 | %{_appdir}/tpl/Boxes/img/*.gif | |
5e90a685 | 111 | %{_smartyplugindir}/* |
56c886e1 SP |
112 | %dir %{_zavar} |
113 | %attr(770,root,http) %{_zavar}/templates_c |