From a57e6949bbe30b17a30b078c956714e33417406d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 31 Jul 2010 16:21:10 +1000 Subject: [PATCH] make ghc_gen_filelists pkg_name arg optional --- ghc-rpm-macros.ghc | 21 ++++++++++++--------- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 3835874..f5e9390 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -19,15 +19,18 @@ # ghc_gen_filelists [pkgname] %ghc_gen_filelists() \ -rm -f %1-devel.files %1-prof.files %1-doc.files \ -echo '%defattr(-,root,root,-)' > %1-devel.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> %1-devel.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1-devel.files \ -echo '%defattr(-,root,root,-)' > %1-prof.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \ -sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1-devel.files %1-prof.files \ -echo '%defattr(-,root,root,-)' > %1-doc.files \ -echo '%{ghcdocdir}' >> %1-doc.files \ +pkgname=%{?1}%{!?1:%{pkg_name}} \ +basefile=ghc-${pkgname} \ +pkgnamever=${pkgname}-%{version} \ +rm -f ${basefile}-devel.files ${basefile}-prof.files ${basefile}-doc.files \ +echo '%defattr(-,root,root,-)' > ${basefile}-devel.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> ${basefile}-devel.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> ${basefile}-devel.files \ +echo '%defattr(-,root,root,-)' > ${basefile}-prof.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> ${basefile}-prof.files \ +sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}-devel.files ${basefile}-prof.files \ +echo '%defattr(-,root,root,-)' > ${basefile}-doc.files \ +echo '%{ghcdocdir}' >> ${basefile}-doc.files \ %{nil} %ghc_gen_scripts %cabal register --gen-script ; %cabal unregister --gen-script diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 951a128..a8a9f96 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.7.0.610.2 +Version: 0.7.0.610.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jul 31 2010 Jens Petersen - 0.7.0.610.3-1 +- make ghc_gen_filelists pkg_name arg optional + * Sat Jul 31 2010 Jens Petersen - 0.7.0.610.2-1 - also backport cabal_pkg_conf for f13 compatibility - fix ghc_strip_dynlinked when no dynlinked files @@ -64,6 +67,7 @@ rm -rf $RPM_BUILD_ROOT in current released f12 binlib packages - for same reason ghcdocdir, ghcpkgdir, ghc_gen_filelists do not take optional name arg +- ghc-6.10.4 haddock does not support hscolour * Thu Dec 24 2009 Jens Petersen - 0.2.6-1 - backport: