]> git.pld-linux.org Git - packages/ZoneAdmin.git/blob - ZoneAdmin.spec
- ln -s for config
[packages/ZoneAdmin.git] / ZoneAdmin.spec
1 Summary:        A Web-based administration interface for powerDNS
2 Name:           ZoneAdmin
3 Version:        0.1
4 Release:        0.1
5 License:        GPL
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
11 Requires:       webapps
12 %if %{with trigger}
13 Requires(triggerpostun):        sed >= 4.0
14 %endif
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _webapps        /etc/webapps
19 %define         _webapp         %{name}
20 %define         _sysconfdir     %{_webapps}/%{_webapp}
21 %define         _appdir         %{_datadir}/%{_webapp}
22
23 %description
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.
32
33 %prep
34 %setup -q -n %{name}-%{version}-stable
35
36 cat > apache.conf <<'EOF'
37 Alias /%{name} %{_appdir}
38 <Directory %{_appdir}>
39         Allow from all
40 </Directory>
41 EOF
42
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
45
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
52
53 %triggerin -- apache1 < 1.3.37-3, apache1-base
54 %webapp_register apache %{_webapp}
55
56 %triggerun -- apache1 < 1.3.37-3, apache1-base
57 %webapp_unregister apache %{_webapp}
58
59 %triggerin -- apache < 2.2.0, apache-base
60 %webapp_register httpd %{_webapp}
61
62 %triggerun -- apache < 2.2.0, apache-base
63 %webapp_unregister httpd %{_webapp}
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
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
74 %{_appdir}/*.php
75 %dir %{_appdir}/contrib
76 %{_appdir}/contrib/*.php
77 %{_appdir}/contrib/*.sql
78 %dir %{_appdir}/img
79 %{_appdir}/img/*.gif
80 %{_appdir}/img/*.png
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
92 %dir %{_appdir}/lang
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
This page took 0.040493 seconds and 3 git commands to generate.