fix ghc-deps.sh for ghc builds: use .a files again instead of .conf

- .conf handling broke since ghc .conf filenames include hash
- now extract pkg-ver from filename rather than dir (for 7.10 support)
- ignore prof libs
epel9
Jens Petersen 10 years ago
parent cfbdfc60ac
commit 0c236fe8e5

@ -42,13 +42,14 @@ for i in $files; do
SELF=""
case $i in
*/libHSrts.*) ;;
*/libHS*_p.a) ;;
*/libHS*.so)
META=ghc
PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%")
PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/[^/]\+/libHS\(.\+-[0-9.]\+\)\(-.\+\)\?-ghc${GHC_VER}\.so%\1%")
;;
*/package.conf.d/*.conf)
*/libHS*.a)
META=ghc-devel
PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\).conf%\1%")
PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/[^/]\+/libHS\(.\+-[0-9.]\+\)\(-.\+\)\?\.a%\1%")
if [ -f $PKGBASEDIR/$PKGVER/libHS$PKGVER-ghc${GHC_VER}.so ]; then
SELF=ghc
fi
@ -70,7 +71,7 @@ for i in $files; do
fi
elif [ "$MODE" = "--requires" ]; then
if file $i | grep -q 'executable, .* dynamically linked'; then
BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}.so%\1%")
BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}\.so%\1%")
if [ -d "$PKGCONFDIR" ]; then
PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR"
fi

@ -6,7 +6,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 1.4.12
Version: 1.4.13
Release: 1%{?dist}
Summary: RPM macros for building packages for GHC
@ -112,7 +112,11 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag
%changelog
* Fri Mar 20 2015 Jens Petersen <petersen@redhat.com>
* Mon Mar 23 2015 Jens Petersen <petersen@redhat.com> - 1.4.13-1
- fix ghc-deps.sh for ghc builds:
- use .a files again instead of .conf for devel deps
- extract pkg-ver from library filename rather than directory
(should also work for 7.10)
- introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier
* Sat Mar 7 2015 Jens Petersen <petersen@fedoraproject.org> - 1.4.12-1

Loading…
Cancel
Save