[php-horde-Horde-Role] Install macros to /usr/lib/rpm/macros.d where available
Remi Collet
remi at fedoraproject.org
Tue Feb 11 12:36:26 UTC 2014
commit cd5f0ab44107b466cab9498f568953f935d2eed0
Author: Remi Collet <remi at fedoraproject.org>
Date: Tue Feb 11 13:36:58 2014 +0100
Install macros to /usr/lib/rpm/macros.d where available
php-horde-Horde-Role.spec | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/php-horde-Horde-Role.spec b/php-horde-Horde-Role.spec
index 058764f..0a19589 100644
--- a/php-horde-Horde-Role.spec
+++ b/php-horde-Horde-Role.spec
@@ -1,11 +1,20 @@
+# spec file for php-horde-Horde-Role
+#
+# Copyright (c) 2013-2014 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/3.0/
+#
+# Please, preserve the changelog entries
+#
+%{!?__pear: %global __pear %{_bindir}/pear}
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
-%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%global pear_name Horde_Role
%global pear_channel pear.horde.org
+%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Name: php-horde-Horde-Role
Version: 1.0.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: PEAR installer role used to install Horde components
Group: Development/Libraries
@@ -59,8 +68,7 @@ cd %{pear_name}-%{version}
mkdir -p %{buildroot}%{_datadir}/horde
# Install new RPM macro
-mkdir -p %{buildroot}%{_sysconfdir}/rpm
-install -pm 644 macros.horde %{buildroot}%{_sysconfdir}/rpm
+install -D -pm 644 macros.horde %{buildroot}%{macrosdir}/macros.horde
cd %{pear_name}-%{version}
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
@@ -91,7 +99,7 @@ fi
%files
%defattr(-,root,root,-)
%doc %{pear_docdir}/%{pear_name}
-%{_sysconfdir}/rpm/macros.horde
+%{macrosdir}/macros.horde
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/PEAR/Installer/Role/Horde
%{pear_phpdir}/PEAR/Installer/Role/Horde.php
@@ -101,6 +109,9 @@ fi
%changelog
+* Tue Feb 11 2014 Remi Collet <remi at fedoraproject.org> - 1.0.1-4
+- Install macros to /usr/lib/rpm/macros.d where available
+
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list