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
%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.
%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}
%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}