]> git.pld-linux.org Git - packages/drupal-theme-box_grey_smarty.git/commitdiff
- each smarty template must have its own cache dir
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 11 Jan 2006 23:38:15 +0000 (23:38 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    drupal-theme-box_grey_smarty.spec -> 1.7

drupal-theme-box_grey_smarty.spec

index 12ea43a55e79250e4b4d097a551bf6ef23ccc663..6e955e38bdcaace3bb3199174d78317b36359f41 100644 (file)
@@ -4,7 +4,7 @@ Summary:        Drupal Theme Box_grey_smarty
 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
@@ -20,6 +20,7 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %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.
@@ -33,7 +34,7 @@ rm -f LICENSE.txt # GPL v2
 
 %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}
@@ -48,8 +49,19 @@ ln -s ../../htdocs/themes/%{themename}/box_cleanslate_smarty $RPM_BUILD_ROOT%{_t
 %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}
This page took 0.098878 seconds and 4 git commands to generate.