]> git.pld-linux.org Git - packages/ZoneAdmin.git/blob - ZoneAdmin.spec
- use %php_data_dir macro
[packages/ZoneAdmin.git] / ZoneAdmin.spec
1 Summary:        A Web-based administration interface for powerDNS
2 Summary(pl.UTF-8):      Interfejs administracyjny WWW do serwera powerDNS
3 Name:           ZoneAdmin
4 Version:        0.2
5 Release:        0.1
6 License:        GPL
7 Group:          Applications/WWW
8 Source0:        http://dl.sourceforge.net/zoneadmin/%{name}-%{version}-beta1.tar.gz
9 # Source0-md5:  a848e14d947d41734d8a23d72d0196da
10 Patch0:         %{name}-smarty.patch
11 URL:            http://open.megabit.net/index.php?section=pro_home&project=ZoneAdmin
12 BuildRequires:  rpmbuild(macros) >= 1.461
13 Requires:       Smarty >= 2.6.18-2
14 Requires:       webapps
15 Requires:       webserver(php)
16 BuildArch:      noarch
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         _webapps        /etc/webapps
20 %define         _webapp         %{name}
21 %define         _smartyplugindir        %{php_data_dir}/Smarty/plugins
22 %define         _sysconfdir     %{_webapps}/%{_webapp}
23 %define         _zavar          /var/lib/%{name}
24 %define         _appdir         %{_datadir}/%{_webapp}
25
26 %description
27 ZoneAdmin is a Web interface for the powerDNS name server using the
28 MySQL backend. It allows you to manage existing zones and add, remove,
29 and alter new ones, supports on-the-fly input validation, and allows
30 comments per zone and per record. Furthermore, it keeps a detailed
31 history of changes and allows you to temporary enable or disable zones
32 without having to remove them completely. New zones can use templates
33 that contain predefined records. It is designed to be used with one of
34 Apache's authentication methods.
35
36 %description -l pl.UTF-8
37 ZoneAdmin to interfejs WWW do serwera nazw powerDNS wykorzystującego
38 backend MySQL. Pozwala na zarządzanie istniejącymi strefami oraz
39 dodawanie, usuwanie i zmianę nowych; obsługuje sprawdzanie poprawności
40 danych wejściowych w locie, pozwala na dodawanie komentarzy dla całej
41 strefy oraz dla każdego rekordu. Ponadto utrzymuje szczegółową
42 historię zmian i pozwala na tymczasowe włączanie i wyłączanie stref
43 bez potrzeby całkowitego usuwania ich. Nowe strefy mogą wykorzystywać
44 szablony z predefiniowanymi rekordami. Interfejs jest zaprojektowany
45 do używania z jedną z metod uwierzytelniania serwera Apache.
46
47 %prep
48 %setup -q -n %{name}-%{version}-beta1
49 %patch0 -p1
50
51 cat > apache.conf <<'EOF'
52 Alias /%{name} %{_appdir}
53 <Directory %{_appdir}>
54         Allow from all
55 </Directory>
56 EOF
57
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_smartyplugindir},%{_zavar}/templates_c,%{_appdir}}
60
61 install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
62 install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
63 install *.php   $RPM_BUILD_ROOT%{_appdir}
64 cp -a {contrib,img,includes,lang,tpl}   $RPM_BUILD_ROOT%{_appdir}
65 cp -a includes/smarty/libs/plugins/*    $RPM_BUILD_ROOT%{_smartyplugindir}
66 mv $RPM_BUILD_ROOT%{_appdir}/includes/config.php.dist $RPM_BUILD_ROOT%{_sysconfdir}/config.php
67 ln -s %{_sysconfdir}/config.php         $RPM_BUILD_ROOT%{_appdir}/includes/config.php
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %triggerin -- apache1 < 1.3.37-3, apache1-base
73 %webapp_register apache %{_webapp}
74
75 %triggerun -- apache1 < 1.3.37-3, apache1-base
76 %webapp_unregister apache %{_webapp}
77
78 %triggerin -- apache < 2.2.0, apache-base
79 %webapp_register httpd %{_webapp}
80
81 %triggerun -- apache < 2.2.0, apache-base
82 %webapp_unregister httpd %{_webapp}
83
84 %files
85 %defattr(644,root,root,755)
86 %dir %attr(750,root,http) %{_sysconfdir}
87 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
88 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
89 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
90 %{_appdir}/*.php
91 %dir %{_appdir}/contrib
92 %{_appdir}/contrib/*.php
93 %{_appdir}/contrib/*.sql
94 %dir %{_appdir}/img
95 %{_appdir}/img/*.gif
96 %{_appdir}/img/*.png
97 %dir %{_appdir}/includes
98 %{_appdir}/includes/*.php
99 %dir %{_appdir}/includes/smarty/libs/
100 %{_appdir}/includes/smarty/libs/*.php
101 %{_appdir}/includes/smarty/libs/*.tpl
102 %dir %{_appdir}/includes/smarty/libs/internals
103 %{_appdir}/includes/smarty/libs/internals/*.php
104 #%dir %{_appdir}/includes/smarty/libs/plugins
105 #%{_appdir}/includes/smarty/libs/plugins/*.php
106 #%dir %{_appdir}/includes/smarty_plugins
107 #%{_appdir}/includes/smarty_plugins/*.php
108 %dir %{_appdir}/lang
109 %{_appdir}/lang/*.conf
110 %dir %{_appdir}/tpl/Boxes
111 %{_appdir}/tpl/Boxes/*.css
112 %{_appdir}/tpl/Boxes/*.js
113 %{_appdir}/tpl/Boxes/*.tpl
114 %dir %{_appdir}/tpl/Boxes/img
115 %{_appdir}/tpl/Boxes/img/*.jpg
116 %{_appdir}/tpl/Boxes/img/*.gif
117 %{_smartyplugindir}/*
118 %dir %{_zavar}
119 %attr(770,root,http) %{_zavar}/templates_c
This page took 0.091354 seconds and 3 git commands to generate.