summaryrefslogtreecommitdiff
path: root/drupal-theme-box_grey_smarty.spec
diff options
context:
space:
mode:
Diffstat (limited to 'drupal-theme-box_grey_smarty.spec')
-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}