SPECS: Smarty.spec - Smarty has nothing to do with PEAR - move Sma...
glen
glen at pld-linux.org
Wed Oct 26 15:54:38 CEST 2005
Author: glen Date: Wed Oct 26 13:54:38 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- Smarty has nothing to do with PEAR
- move Smarty out of PEAR dirs and kill PEAR dep (trigger included)
- rel 3
---- Files affected:
SPECS:
Smarty.spec (1.27 -> 1.28)
---- Diffs:
================================================================
Index: SPECS/Smarty.spec
diff -u SPECS/Smarty.spec:1.27 SPECS/Smarty.spec:1.28
--- SPECS/Smarty.spec:1.27 Sun Sep 18 11:33:51 2005
+++ SPECS/Smarty.spec Wed Oct 26 15:54:33 2005
@@ -5,7 +5,7 @@
Summary(pl): System szablonów dla PHP
Name: Smarty
Version: 2.6.10
-Release: 2
+Release: 3
License: LGPL
Group: Development/Languages/PHP
Source0: http://smarty.php.net/distributions/%{name}-%{version}.tar.gz
@@ -15,10 +15,11 @@
URL: http://smarty.php.net/
BuildRequires: rpm-php-pearprov >= 4.3
Requires: php-common
-Requires: php-pear
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _smartydir %{_datadir}/php/Smarty
+
%description
Smarty is a template engine for PHP. Smarty provides your basic
variable substitution and dynamic block functionality, and also takes
@@ -52,26 +53,41 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{php_pear_dir}/%{name}/{internals,plugins}
+install -d $RPM_BUILD_ROOT{%{_smartydir}/{internals,plugins},%{php_pear_dir}}
+
+install libs/{Config_File,Smarty{,_Compiler}}.class.php $RPM_BUILD_ROOT%{_smartydir}
+install libs/debug.tpl $RPM_BUILD_ROOT%{_smartydir}
+install libs/internals/*.php $RPM_BUILD_ROOT%{_smartydir}/internals
+install libs/plugins/*.php $RPM_BUILD_ROOT%{_smartydir}/plugins
-install libs/{Config_File,Smarty{,_Compiler}}.class.php $RPM_BUILD_ROOT%{php_pear_dir}/%{name}
-install libs/debug.tpl $RPM_BUILD_ROOT%{php_pear_dir}/%{name}
-install libs/internals/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{name}/internals
-install libs/plugins/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{name}/plugins
+# backards compatible
+ln -s %{_smartydir} $RPM_BUILD_ROOT%{php_pear_dir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
+# make compat symlink, the symlink is discarded using %ghost on package uninstall
+%triggerpostun -- Smarty < 2.6.10-1.2
+if [ -d %{php_pear_dir}/%{name}/plugins ]; then
+ mv %{php_pear_dir}/%{name}/plugins/* %{_smartydir}/plugins
+ rmdir %{php_pear_dir}/%{name}/plugins 2>/dev/null
+fi
+rmdir %{php_pear_dir}/%{name} 2>/dev/null || mv -v %{php_pear_dir}/%{name}{,.rpmsave}
+ln -s %{_smartydir} %{php_pear_dir}/%{name}
+
%files
%defattr(644,root,root,755)
%doc BUGS ChangeLog FAQ INSTALL NEWS README RELEASE_NOTES TODO
-%dir %{php_pear_dir}/%{name}
-%dir %{php_pear_dir}/%{name}/internals
-%dir %{php_pear_dir}/%{name}/plugins
-%{php_pear_dir}/%{name}/*.class.php
-%{php_pear_dir}/%{name}/debug.tpl
-%{php_pear_dir}/%{name}/internals/*.php
-%{php_pear_dir}/%{name}/plugins/*.php
+%dir %{_smartydir}
+%dir %{_smartydir}/internals
+%dir %{_smartydir}/plugins
+%{_smartydir}/*.class.php
+%{_smartydir}/debug.tpl
+%{_smartydir}/internals/*.php
+%{_smartydir}/plugins/*.php
+
+# for the sake of bc
+%ghost %{php_pear_dir}/%{name}
%files doc
%defattr(644,root,root,755)
@@ -83,6 +99,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.28 2005/10/26 13:54:33 glen
+- Smarty has nothing to do with PEAR
+- move Smarty out of PEAR dirs and kill PEAR dep (trigger included)
+- rel 3
+
Revision 1.27 2005/09/18 09:33:51 glen
- require php-common instead of virtual "php" (virtual php means apache module)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/Smarty.spec?r1=1.27&r2=1.28&f=u
More information about the pld-cvs-commit
mailing list