From 4b65f2f48ebc0f57b8767c95a8fc13d62de1b571 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 28 May 2011 15:02:35 +0900 Subject: [PATCH] move macros back to /etc/rpm and add %macro_file --- ghc-rpm-macros.spec | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 263b19f..aa19974 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,9 @@ %global debug_package %{nil} +%global macros_file %{_sysconfdir}/rpm/macros.ghc-pkg + Name: ghc-rpm-macros -Version: 0.13.1 +Version: 0.13.2 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -19,8 +21,8 @@ Source3: ghc-deps.sh %description A set of macros for building GHC packages following the Haskell Guidelines -of the Fedora Haskell SIG. This package probably shouldn't be installed on -its own as GHC is needed in order to make use of these macros. +of the Fedora Haskell SIG. ghc needs to be installed in order to make use of +these macros. %prep %setup -c -T @@ -32,14 +34,16 @@ echo no build stage needed %install -mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm -install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm/macros.ghc -install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm +mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm +install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file} + +mkdir -p %{buildroot}/%{_prefix}/lib/rpm +install -p %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm # this is why this package is now arch-dependent: # turn off shared libs and dynamic linking on secondary archs %ifnarch %{ix86} x86_64 -cat >> ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc <> %{buildroot}/%{macros_file} < - 0.13.2-1 +- macros need to live in /etc/rpm +- use macro_file for macros.ghc filepath + * Sat May 28 2011 Jens Petersen - 0.13.1-1 - move macros.ghc to /usr/lib/rpm to avoid conflict with redhat-rpm-config