summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElan Ruusamäe2006-01-11 23:38:15 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commitff385ba427fd6b899640b12d085eb7a66ab70332 (patch)
tree7d5c6d2f93bb733951b68feec9f74651cf9a6432
parentf1859a8e20af97f24f1160af18722bba6031aa82 (diff)
downloaddrupal-theme-box_grey_smarty-ff385ba427fd6b899640b12d085eb7a66ab70332.zip
drupal-theme-box_grey_smarty-ff385ba427fd6b899640b12d085eb7a66ab70332.tar.gz
- each smarty template must have its own cache dir
Changed files: drupal-theme-box_grey_smarty.spec -> 1.7
-rw-r--r--drupal-theme-box_grey_smarty.spec16
1 files changed, 14 insertions, 2 deletions
diff --git a/drupal-theme-box_grey_smarty.spec b/drupal-theme-box_grey_smarty.spec
index 12ea43a..6e955e3 100644
--- a/drupal-theme-box_grey_smarty.spec
+++ b/drupal-theme-box_grey_smarty.spec
@@ -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}