]> git.pld-linux.org Git - packages/ZoneAdmin.git/blame - ZoneAdmin.spec
- trying to move templates_c to /var/lib
[packages/ZoneAdmin.git] / ZoneAdmin.spec
CommitLineData
04457a35 1Summary: A Web-based administration interface for powerDNS
2Name: ZoneAdmin
d06d50f0 3Version: 0.2
04457a35 4Release: 0.1
5License: GPL
6Group: Applications/WWW
d06d50f0
SP
7Source0: http://dl.sourceforge.net/zoneadmin/%{name}-%{version}-beta1.tar.gz
8# Source0-md5: a848e14d947d41734d8a23d72d0196da
5e90a685 9Patch0: %{name}-smarty.patch
04457a35 10URL: http://open.megabit.net/index.php?section=pro_home&project=ZoneAdmin
11BuildRequires: rpmbuild(macros) >= 1.268
0304c045 12Requires: Smarty >= 2.6.18-2
04457a35 13Requires: webapps
0304c045 14Requires: webserver(php)
04457a35 15%if %{with trigger}
16Requires(triggerpostun): sed >= 4.0
17%endif
18BuildArch: noarch
19BuildRoot: %{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
29ZoneAdmin is a Web interface for the powerDNS name server using the
30MySQL backend. It allows you to manage existing zones and add, remove,
31and alter new ones, supports on-the-fly input validation, and allows
32comments per zone and per record. Furthermore, it keeps a detailed
33history of changes and allows you to temporary enable or disable zones
34without having to remove them completely. New zones can use templates
35that contain predefined records. It is designed to be used with one of
36Apache's authentication methods.
37
38%prep
d06d50f0 39%setup -q -n %{name}-%{version}-beta1
5e90a685
SP
40%patch0 -p1
41
42mkdir smarty-plugins
04457a35 43
44cat > apache.conf <<'EOF'
45Alias /%{name} %{_appdir}
46<Directory %{_appdir}>
47 Allow from all
48</Directory>
49EOF
50
51rm -rf $RPM_BUILD_ROOT
56c886e1 52install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_smartyplugindir},%{_zavar}/templates_c,%{_appdir}}
04457a35 53
54install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
55install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
56install *.php $RPM_BUILD_ROOT%{_appdir}
57cp -a {contrib,img,includes,lang,templates_c,tpl} $RPM_BUILD_ROOT%{_appdir}
5e90a685 58cp -a includes/smarty/libs/* $RPM_BUILD_ROOT%{_smartyplugindir}
39b738a3
SP
59mv $RPM_BUILD_ROOT%{_appdir}/includes/config.php.dist $RPM_BUILD_ROOT%{_sysconfdir}/config.php
60ln -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
75rm -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
This page took 0.095064 seconds and 4 git commands to generate.