From 25cfe11f3dfd25bd3a632b517055c0f08940ad1f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Jul 2019 08:05:32 +0000 Subject: [PATCH] fix deps generation for devel package.conf and prof libHS*_p.a --- ghc-deps.sh | 31 ++++++++++++++++++------------- ghc.attr | 2 +- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 67443eb..ca86d9a 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -24,20 +24,25 @@ files=$(cat) for i in $files; do meta="" case $i in - */libHS*_p.a) - meta=prof + # exclude rts.conf + $pkgconfdir/*-*.conf) + name=$(grep "^name: " $i | sed -e "s/name: //") + ids=$($GHC_PKG field $name $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + for d in $ids; do + case $d in + *-*) echo "ghc-devel($d)" ;; + *) ;; + esac + done ;; - */libHS*.a) - meta=devel + */libHS*_p.a) + pkgver=$(basename $(dirname $i)) + ids=$($GHC_PKG field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + for d in $ids; do + case $d in + *-*) echo "ghc-prof($d)" ;; + esac + done ;; esac - if [ -n "$meta" ]; then - pkgver=$(basename $(dirname $i)) - ids=$($GHC_PKG field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") - for d in $ids; do - case $d in - *-*) echo "ghc-${meta}($d)" ;; - esac - done - fi done diff --git a/ghc.attr b/ghc.attr index ca391b6..94bd957 100644 --- a/ghc.attr +++ b/ghc.attr @@ -1,3 +1,3 @@ %__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_path ^%{ghclibdir}/.*/libHS.*\.a$ +%__ghc_path ^%{ghclibdir}/(.*/libHS.*_p\.a|package.conf.d/.*\.conf)$