1 Summary: A Web-based administration interface for powerDNS
6 Group: Applications/WWW
7 Source0: http://dl.sourceforge.net/zoneadmin/%{name}-%{version}-stable.tar.gz
8 # Source0-md5: 1552f1c4e179a9cba3b6eebaa4c0f431
9 URL: http://open.megabit.net/index.php?section=pro_home&project=ZoneAdmin
10 BuildRequires: rpmbuild(macros) >= 1.268
13 Requires(triggerpostun): sed >= 4.0
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _webapps /etc/webapps
19 %define _webapp %{name}
20 %define _sysconfdir %{_webapps}/%{_webapp}
21 %define _appdir %{_datadir}/%{_webapp}
24 ZoneAdmin is a Web interface for the powerDNS name server using the
25 MySQL backend. It allows you to manage existing zones and add, remove,
26 and alter new ones, supports on-the-fly input validation, and allows
27 comments per zone and per record. Furthermore, it keeps a detailed
28 history of changes and allows you to temporary enable or disable zones
29 without having to remove them completely. New zones can use templates
30 that contain predefined records. It is designed to be used with one of
31 Apache's authentication methods.
34 %setup -q -n %{name}-%{version}-stable
36 cat > apache.conf <<'EOF'
37 Alias /%{name} %{_appdir}
38 <Directory %{_appdir}>
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
46 install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
47 install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
48 install *.php $RPM_BUILD_ROOT%{_appdir}
49 cp -a {contrib,img,includes,lang,templates_c,tpl} $RPM_BUILD_ROOT%{_appdir}
50 mv $RPM_BUILD_ROOT%{_appdir}/includes/config.php.dist $RPM_BUILD_ROOT%{_sysconfdir}/config.php
51 ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/includes/config.php
53 %triggerin -- apache1 < 1.3.37-3, apache1-base
54 %webapp_register apache %{_webapp}
56 %triggerun -- apache1 < 1.3.37-3, apache1-base
57 %webapp_unregister apache %{_webapp}
59 %triggerin -- apache < 2.2.0, apache-base
60 %webapp_register httpd %{_webapp}
62 %triggerun -- apache < 2.2.0, apache-base
63 %webapp_unregister httpd %{_webapp}
66 rm -rf $RPM_BUILD_ROOT
69 %defattr(644,root,root,755)
70 %dir %attr(750,root,http) %{_sysconfdir}
71 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
72 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
73 %attr(660,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
75 %dir %{_appdir}/contrib
76 %{_appdir}/contrib/*.php
77 %{_appdir}/contrib/*.sql
81 %dir %{_appdir}/includes
82 %{_appdir}/includes/*.php
83 %dir %{_appdir}/includes/smarty/libs/
84 %{_appdir}/includes/smarty/libs/*.php
85 %{_appdir}/includes/smarty/libs/*.tpl
86 %dir %{_appdir}/includes/smarty/libs/internals
87 %{_appdir}/includes/smarty/libs/internals/*.php
88 %dir %{_appdir}/includes/smarty/libs/plugins
89 %{_appdir}/includes/smarty/libs/plugins/*.php
90 %dir %{_appdir}/includes/smarty_plugins
91 %{_appdir}/includes/smarty_plugins/*.php
93 %{_appdir}/lang/*.conf
94 %dir %{_appdir}/templates_c
95 %dir %{_appdir}/tpl/Boxes
96 %{_appdir}/tpl/Boxes/*.css
97 %{_appdir}/tpl/Boxes/*.js
98 %{_appdir}/tpl/Boxes/*.tpl
99 %dir %{_appdir}/tpl/Boxes/img
100 %{_appdir}/tpl/Boxes/img/*.jpg
101 %{_appdir}/tpl/Boxes/img/*.gif
102 %dir %attr(770,root,http) %{_appdir}/templates_c