SPECS: poweradmin.spec - switched to webapps - updated to 1.2.7-pa...
luzik
luzik at pld-linux.org
Fri Jun 8 07:42:51 CEST 2007
Author: luzik Date: Fri Jun 8 05:42:51 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- switched to webapps
- updated to 1.2.7-patched
---- Files affected:
SPECS:
poweradmin.spec (1.9 -> 1.10)
---- Diffs:
================================================================
Index: SPECS/poweradmin.spec
diff -u SPECS/poweradmin.spec:1.9 SPECS/poweradmin.spec:1.10
--- SPECS/poweradmin.spec:1.9 Tue Feb 13 09:06:41 2007
+++ SPECS/poweradmin.spec Fri Jun 8 07:42:46 2007
@@ -1,36 +1,32 @@
# $Revision$, $Date$
-# TODO
-# - webapps
Summary: PowerAdmin - a web-based front-end for the PowerDNS
Summary(pl.UTF-8): PowerAdmin - oparty na WWW interfejs dla PowerDNS-a
Name: poweradmin
Version: 1.2.7
-Release: 0.2
+Release: 0.9
License: GPL
Group: Applications/Databases/Interfaces
-Source0: http://dl.sourceforge.net/poweradmin/%{name}-%{version}.tar.gz
-# Source0-md5: 0e639b7a245b7ccda0af4b50221d2cea
-Source1: %{name}.conf
+Source0: http://www.poweradmin.org/releases/%{name}-%{version}-patched.tar.gz
+# Source0-md5: 105bfc2f5e22816c4f5412d448833fb7
Patch0: %{name}-addmasterip.patch
+Patch1: %{name}-bugs.patch
URL: http://www.poweradmin.org/
-Requires: apache(mod_dir)
-Requires: mysql >= 3.23.2
-Requires: mysql-client >= 3.23.56-1
-Requires: php-pear
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires: webapps
+Requires(triggerpostun): sed >= 4.0
+Requires: php(mysql)
+Requires: php(dbase)
+Requires: php(zlib)
Requires: php-pear-DB
-Requires: php-pear-PEAR
-Requires: php4
-#Requires: php4-common
-Requires: php4-dbase
-Requires: php4-mysql
-Requires: php4-pcre
-Requires: php4-zlib
-#Requires: sed
-Requires: webserver = apache
+Requires: webserver(indexfile)
+Requires: webserver(php)
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _poweradmindir /usr/share/PowerAdmin
+%define _webapps /etc/webapps
+%define _webapp %{name}
+%define _sysconfdir %{_webapps}/%{_webapp}
+%define _appdir %{_datadir}/%{_webapp}
%description
PowerAdmin is a web-based front-end for the PowerDNS
@@ -41,64 +37,74 @@
(http://www.powerdns.com/).
%prep
-%setup -q
+%setup -q -n %{name}
%patch0 -p1
+%patch1 -p1
+
+cat > apache.conf <<'EOF'
+Alias /%{name} %{_appdir}
+<Directory %{_appdir}>
+ Allow from all
+</Directory>
+EOF
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_poweradmindir}/{images,inc,docs,style} $RPM_BUILD_ROOT%{_sysconfdir}/httpd
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{images,inc,docs,style}}
-install *.php *.php-pa $RPM_BUILD_ROOT%{_poweradmindir}
-install docs/{ChangeLog,README,README-Sequence,REDHAT-README,TODO} $RPM_BUILD_ROOT%{_poweradmindir}/docs
-install images/*.* $RPM_BUILD_ROOT%{_poweradmindir}/images
-install style/*.* $RPM_BUILD_ROOT%{_poweradmindir}/style
-install inc/*.* $RPM_BUILD_ROOT%{_poweradmindir}/inc
+install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/%{name}.conf
+mv install.php.orig install.php
+mv inc/config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}
+install *.php *.php-pa $RPM_BUILD_ROOT%{_appdir}
+install images/*.* $RPM_BUILD_ROOT%{_appdir}/images
+install style/*.* $RPM_BUILD_ROOT%{_appdir}/style
+install inc/*.* $RPM_BUILD_ROOT%{_appdir}/inc
+ln -s %{_sysconfdir}/config.inc.php $RPM_BUILD_ROOT%{_appdir}/inc/config.inc.php
-%clean
-rm -rf $RPM_BUILD_ROOT
-%post
-if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
- echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
- if [ -f /var/lock/subsys/httpd ]; then
- /usr/sbin/apachectl restart 1>&2
- fi
-elif [ -d /etc/httpd/httpd.conf ]; then
- ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
- if [ -f /var/lock/subsys/httpd ]; then
- /usr/sbin/apachectl restart 1>&2
- fi
-fi
-
-%preun
-if [ "$1" = "0" ]; then
- umask 027
- if [ -d /etc/httpd/httpd.conf ]; then
- rm -f /etc/httpd/httpd.conf/99_%{name}.conf
- else
- grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
- /etc/httpd/httpd.conf.tmp
- mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
- fi
- if [ -f /var/lock/subsys/httpd ]; then
- /usr/sbin/apachectl restart 1>&2
- fi
-fi
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+%triggerin -- lighttpd
+%webapp_register lighttpd %{_webapp}
+
+%triggerun -- lighttpd
+%webapp_unregister lighttpd %{_webapp}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%{_poweradmindir}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/%{name}.conf
+%doc docs/{ChangeLog,README,README-Sequence,REDHAT-README,TODO}
+%dir %attr(750,root,http) %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
+%{_appdir}
-%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.10 2007/06/08 05:42:46 luzik
+- switched to webapps
+- updated to 1.2.7-patched
+
Revision 1.9 2007/02/13 08:06:41 glen
- tabs in preamble
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/poweradmin.spec?r1=1.9&r2=1.10&f=u
More information about the pld-cvs-commit
mailing list