packages: phorum/phorum.spec - package console_upgrade and perform upgrades...

glen glen at pld-linux.org
Tue Feb 1 15:53:37 CET 2011


Author: glen                         Date: Tue Feb  1 14:53:37 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- package console_upgrade and perform upgrades automatically

---- Files affected:
packages/phorum:
   phorum.spec (1.67 -> 1.68) 

---- Diffs:

================================================================
Index: packages/phorum/phorum.spec
diff -u packages/phorum/phorum.spec:1.67 packages/phorum/phorum.spec:1.68
--- packages/phorum/phorum.spec:1.67	Tue Feb  1 15:23:13 2011
+++ packages/phorum/phorum.spec	Tue Feb  1 15:53:31 2011
@@ -8,7 +8,7 @@
 Summary(pl.UTF-8):	Phorum - implementacja forum WWW w PHP
 Name:		phorum
 Version:	%{mainver}.16
-Release:	0.1
+Release:	0.3
 License:	Apache-like
 Group:		Applications/WWW
 Source0:	http://www.phorum.org/downloads/%{name}-%{version}.tar.bz2
@@ -28,7 +28,7 @@
 URL:		http://www.phorum.org/
 BuildRequires:	iconv
 BuildRequires:	rpm-php-pearprov
-BuildRequires:	rpmbuild(macros) >= 1.533
+BuildRequires:	rpmbuild(macros) >= 1.595
 BuildRequires:	sed >= 4.0
 BuildRequires:	unzip
 Requires:	%{name}(DB_Provider)
@@ -266,6 +266,12 @@
 mv include/api/examples examples/api
 mv docs/example_mods examples/mods
 mv portable scripts examples
+
+# move console_upgrade back, it is actually useful
+install -d scripts
+mv examples/scripts/console_upgrade.php scripts
+chmod a+rx scripts/*
+
 # so we don't have to package html/pdf/docbook via docs/*
 mv docs/html htmldoc
 mv docs/docbook .
@@ -338,7 +344,7 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{_cachedir}}
-cp -a *.php htdocs include mods templates $RPM_BUILD_ROOT%{_appdir}
+cp -a *.php htdocs include mods templates scripts $RPM_BUILD_ROOT%{_appdir}
 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 cp -a config.php.sample $RPM_BUILD_ROOT%{_sysconfdir}/config.php
@@ -437,15 +443,16 @@
 fi
 
 %post admin
-if [ "$1" = 1 ]; then
-	%banner -e %{name} <<-EOF
-	Initial Phorum setup is simple as:
-	1. creating mysql database:
-	mysqladmin create phorum5
-	2. granting privs and editing %{_sysconfdir}/config.php
-	3. opening http://localhost/phorum/admin.php
+%banner -o -e %{name} <<-EOF
+Initial Phorum setup is simple as:
+
+1. creating mysql database:
+mysqladmin create phorum5
+2. granting privs and editing %{_sysconfdir}/config.php
+3. opening http://localhost/phorum/admin.php
 EOF
-fi
+
+%{_appdir}/scripts/console_upgrade.php || :
 
 %triggerin -- apache1 < 1.3.37-3, apache1-base
 %webapp_register apache %{_webapp}
@@ -471,6 +478,7 @@
 %{_appdir}/common.php
 %{_appdir}/script.php
 %dir %{_appdir}/mods
+%dir %{_appdir}/scripts
 %dir %{_appdir}/templates
 
 %dir %{_appdir}/include
@@ -532,6 +540,7 @@
 %{_appdir}/htdocs/admin.php
 %{_appdir}/include/admin
 %{_appdir}/include/db/upgrade
+%attr(755,root,root) %{_appdir}/scripts/console_upgrade.php
 
 %files phpdoc
 %defattr(644,root,root,755)
@@ -615,6 +624,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.68  2011/02/01 14:53:31  glen
+- package console_upgrade and perform upgrades automatically
+
 Revision 1.67  2011/02/01 14:23:13  glen
 - unhide errors from mysql connect, otherwise impossible to diagnose connection failures
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/phorum/phorum.spec?r1=1.67&r2=1.68&f=u



More information about the pld-cvs-commit mailing list