[ghc-rpm-macros/f12/master] backport cabal_pkg_conf and fix ghc_strip_dynlinked

Jens Petersen petersen at fedoraproject.org
Sat Jul 31 05:50:26 UTC 2010


commit 85ba4d157e68e6b09c59578da2040d7971bf7fb2
Author: Jens Petersen <petersen at redhat.com>
Date:   Sat Jul 31 15:49:33 2010 +1000

    backport cabal_pkg_conf and fix ghc_strip_dynlinked
    
    - also backport cabal_pkg_conf for f13 compatibility
    - fix ghc_strip_dynlinked when no dynlinked files

 ghc-rpm-macros.ghc  |   11 ++++++++---
 ghc-rpm-macros.spec |    6 +++++-
 2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index 6dcb648..3835874 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -43,6 +43,12 @@ echo '%{ghcdocdir}' >> %1-doc.files \
 
 %ghc_pkg_ver() %(ghc-pkg list --global --simple-output %1|sed -e "s/.*%1-//")
 
+# create and install package scripts
+%cabal_pkg_conf \
+%ghc_gen_scripts\
+%ghc_install_scripts\
+%{nil}
+
 # devel pkg basic requires
 %ghc_requires Requires:       ghc = %{ghc_version}\
 Requires(post): ghc = %{ghc_version}\
@@ -163,7 +169,7 @@ This package contains the profiling library.\
 # ghc_strip_dynlinked
 %ghc_strip_dynlinked\
 %if 0%{!?__debug_package:1}\
-find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print | xargs strip\
+find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
 %endif
 
 # ghc_bin_build
@@ -185,7 +191,6 @@ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'
 # ghc_lib_install
 %ghc_lib_install\
 %cabal_install\
-%ghc_gen_scripts\
-%ghc_install_scripts\
+%cabal_pkg_conf\
 %ghc_gen_filelists ghc-%{?pkg_name}%{!?pkg_name:%name}\
 %ghc_strip_dynlinked
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index 9ce39a0..951a128 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -1,5 +1,5 @@
 Name:		ghc-rpm-macros
-Version:	0.7.0.610.1
+Version:	0.7.0.610.2
 Release:	1%{?dist}
 Summary:	Macros for building packages for GHC
 
@@ -48,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sat Jul 31 2010 Jens Petersen <petersen at redhat.com> - 0.7.0.610.2-1
+- also backport cabal_pkg_conf for f13 compatibility
+- fix ghc_strip_dynlinked when no dynlinked files
+
 * Sat Jul 31 2010 Jens Petersen <petersen at redhat.com> - 0.7.0.610.1-1
 - backport 0.7.1 to ghc-6.10:
 - add ghc_bin_build, ghc_bin_install, ghc_lib_build, ghc_lib_install,


More information about the scm-commits mailing list