[gnustep-make] Use correct macros directory on systems with RPM >= 4.11

Michel Alexandre Salim salimma at fedoraproject.org
Fri Feb 7 03:00:12 UTC 2014


commit 7765580267936614026e582925ce63016c3ef964
Author: Michel Alexandre Salim <salimma at fedoraproject.org>
Date:   Fri Feb 7 10:00:39 2014 +0700

    Use correct macros directory on systems with RPM >= 4.11

 gnustep-make.spec |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/gnustep-make.spec b/gnustep-make.spec
index c208d78..36ff3c7 100644
--- a/gnustep-make.spec
+++ b/gnustep-make.spec
@@ -1,8 +1,12 @@
 %global debug_package %{nil}
 
+# prefer new (rpm >= 4.11) macrosdir if present
+%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] ||
+d=%{_sysconfdir}/rpm; echo $d)
+
 Name:           gnustep-make
 Version:        2.6.6
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        GNUstep makefile package
 
 Group:          Development/Tools
@@ -11,7 +15,7 @@ URL:            http://www.gnustep.org/
 Source0:        ftp://ftp.gnustep.org/pub/gnustep/core/%{name}-%{version}.tar.gz
 
 # Taken from git://fedorahosted.org/git/gnustep-rpm-macros.git
-Source1:	macros.gnustep
+Source1:        macros.gnustep
 
 # Patch to fix #1005328 (Using Framework.mate with DESTPATH)
 Patch1:         gnustep-make-2.6.5-framework.patch
@@ -90,8 +94,8 @@ done
 mkdir -p %{buildroot}%{_prefix}{,/local}/share/GNUstep/Documentation/Developer
 
 # INstall rpm macros
-install -d %{buildroot}%{_sysconfdir}/rpm
-install -p %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm
+install -d %{buildroot}%{macrosdir}
+install -p %{SOURCE1} %{buildroot}%{macrosdir}
 
 %post
 /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
@@ -109,7 +113,7 @@ fi
 %{_libdir}/GNUstep/Makefiles
 %{_mandir}/man*/*
 %{_infodir}/*
-%{_sysconfdir}/rpm/macros.gnustep
+%{macrosdir}/macros.gnustep
 
 %files -n gnustep-filesystem
 %defattr(-,root,root,-)
@@ -127,6 +131,9 @@ fi
 
 
 %changelog
+* Fri Feb  7 2014 Michel Salim <salimma at fedoraproject.org> - 2.6.6-2
+- Use correct macros directory on systems with RPM >= 4.11
+
 * Sun Jan 12 2014 Jochen Schmitt <Jochen herr-schmitt de> - 2.6.6-1
 - New upstream release
 


More information about the scm-commits mailing list