SPECS: drupal-theme-box_grey_smarty.spec - each smarty template mu...

glen glen at pld-linux.org
Thu Jan 12 00:38:20 CET 2006


Author: glen                         Date: Wed Jan 11 23:38:20 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- each smarty template must have its own cache dir

---- Files affected:
SPECS:
   drupal-theme-box_grey_smarty.spec (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SPECS/drupal-theme-box_grey_smarty.spec
diff -u SPECS/drupal-theme-box_grey_smarty.spec:1.6 SPECS/drupal-theme-box_grey_smarty.spec:1.7
--- SPECS/drupal-theme-box_grey_smarty.spec:1.6	Thu Jan 12 00:29:58 2006
+++ SPECS/drupal-theme-box_grey_smarty.spec	Thu Jan 12 00:38:15 2006
@@ -5,7 +5,7 @@
 Summary(pl):	Motyw Box_grey_smarty dla Drupala
 Name:		drupal-theme-%{themename}
 Version:	%{_ver}.0
-Release:	0.7
+Release:	0.9
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	http://drupal.org/files/projects/%{themename}-%{version}.tar.gz
@@ -21,6 +21,7 @@
 %define		_htdocs			%{_drupaldir}/htdocs
 %define		_themedir		%{_drupaldir}/themes
 %define		_themehtmldir	%{_htdocs}/themes
+%define		_cachedir		/var/cache/drupal/smarty
 
 %description
 A port of the original box_grey theme for the Smarty template engine.
@@ -34,7 +35,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_themehtmldir},%{_themedir}}/%{themename}
+install -d $RPM_BUILD_ROOT{%{_themehtmldir},%{_themedir},%{_cachedir}}/%{themename}
 
 # box_grey_smarty
 install *.{css,png}  $RPM_BUILD_ROOT%{_themehtmldir}/%{themename}
@@ -49,11 +50,22 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+# nuke smarty cache. causes side effects on upgrade
+rm -f %{_cachedir}/%{themename}/*.php
+
+%preun
+if [ "$1" = "0" ]; then
+	# kill cache to allow rpm remove the empty directory
+	rm -f %{_cachedir}/%{themename}/*.php
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc *.txt
 %{_themedir}/%{themename}
 %{_themehtmldir}/%{themename}
+%dir %attr(770,root,http) %{_cachedir}/%{themename}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -61,6 +73,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2006/01/11 23:38:15  glen
+- each smarty template must have its own cache dir
+
 Revision 1.6  2006/01/11 23:29:58  glen
 - update theme provides/requires
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/drupal-theme-box_grey_smarty.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list