packages: phorum/phorum.spec - rm tpl cache on upgrade/removal

glen glen at pld-linux.org
Wed Jan 13 22:14:45 CET 2010


Author: glen                         Date: Wed Jan 13 21:14:45 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rm tpl cache on upgrade/removal

---- Files affected:
packages/phorum:
   phorum.spec (1.36 -> 1.37) 

---- Diffs:

================================================================
Index: packages/phorum/phorum.spec
diff -u packages/phorum/phorum.spec:1.36 packages/phorum/phorum.spec:1.37
--- packages/phorum/phorum.spec:1.36	Wed Jan 13 21:37:15 2010
+++ packages/phorum/phorum.spec	Wed Jan 13 22:14:40 2010
@@ -1,10 +1,12 @@
 # $Revision$, $Date$
+# TODO
+# - modules .css, .js, .jpg are not accessible from web
 %define		themever	5.2
 Summary:	Phorum is a web based message board written in PHP
 Summary(pl.UTF-8):	Phorum - implementacja forum WWW w PHP
 Name:		phorum
 Version:	%{themever}.14
-Release:	0.33
+Release:	0.40
 License:	Apache-like
 Group:		Applications/WWW
 Source0:	http://www.phorum.org/downloads/%{name}-%{version}.tar.bz2
@@ -28,6 +30,7 @@
 %define		_sysconfdir	%{_webapps}/%{_webapp}
 %define		_appdir		%{_datadir}/%{_webapp}
 %define		_phpdocdir	%{_docdir}/phpdoc
+%define		_cachedir	/var/cache/phorum
 
 %description
 Phorum is a web based message board written in PHP who's goal is to be
@@ -276,7 +279,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/cache/phorum}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{_cachedir}}
 cp -a *.php htdocs include mods templates $RPM_BUILD_ROOT%{_appdir}
 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
@@ -339,6 +342,30 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post theme-classic
+rm -f %{_cachedir}/tpl-classic-*
+
+%postun theme-classic
+if [ "$1" = 0 ]; then
+	rm -f %{_cachedir}/tpl-classic-*
+fi
+
+%post theme-emerald
+rm -f %{_cachedir}/tpl-emerald-*
+
+%postun theme-emerald
+if [ "$1" = 0 ]; then
+	rm -f %{_cachedir}/tpl-emerald-*
+fi
+
+%post theme-lightweight
+rm -f %{_cachedir}/tpl-lightweight-*
+
+%postun theme-lightweight
+if [ "$1" = 0 ]; then
+	rm -f %{_cachedir}/tpl-lightweight-*
+fi
+
 %post setup
 if [ "$1" = 1 ]; then
 	%banner -e %{name} <<-EOF
@@ -500,6 +527,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.37  2010/01/13 21:14:40  glen
+- rm tpl cache on upgrade/removal
+
 Revision 1.36  2010/01/13 20:37:15  glen
 - use system recaptcha lib
 
================================================================

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



More information about the pld-cvs-commit mailing list