From 3c68a12dbbf43fcd18bc03cfcad8e6307d28da3d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 13 Jan 2023 08:23:03 +0800 Subject: [PATCH] remove ghc-info.sh again --- ghc-info.sh | 8 -------- ghc-rpm-macros.spec | 4 ---- macros.ghc | 6 +++--- 3 files changed, 3 insertions(+), 15 deletions(-) delete mode 100755 ghc-info.sh diff --git a/ghc-info.sh b/ghc-info.sh deleted file mode 100755 index af1eabf..0000000 --- a/ghc-info.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -[ $# -lt 2 ] && echo "Usage: $(basename "$0") GHCVERSION INFOFIELD" - -GHCVER=$1 -FIELD=$2 - -/usr/bin/ghc-${GHCVER} --info | grep \"$FIELD\" | sed -e 's/.*","\(.*\)")/\1/' diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7a91d69..034a1ce 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -27,7 +27,6 @@ Source9: macros.ghc-os Source10: Setup.hs Source11: cabal-tweak-drop-dep Source12: cabal-tweak-remove-upperbound -Source13: ghc-info.sh Requires: redhat-rpm-config # ghc_version needs ghc-compiler or ghcX.Y-compiler-default Requires: chrpath @@ -132,7 +131,6 @@ install -p -D -m 0644 %{SOURCE6} %{buildroot}%{macros_dir}/macros.ghc-extra install -p -D -m 0644 %{SOURCE9} %{buildroot}%{macros_dir}/macros.ghc-os install -p -D -m 0755 %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/ghc-deps.sh -install -p -D -m 0755 %{SOURCE13} %{buildroot}%{_prefix}/lib/rpm/ghc-info.sh %if 0%{?fedora} || 0%{?rhel} >= 7 install -p -D -m 0644 %{SOURCE7} %{buildroot}%{_prefix}/lib/rpm/fileattrs/ghc.attr @@ -160,7 +158,6 @@ mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries %{_prefix}/lib/rpm/fileattrs/ghc.attr %endif %{_prefix}/lib/rpm/ghc-deps.sh -%{_prefix}/lib/rpm/ghc-info.sh %{_prefix}/lib/rpm/ghc-pkg-wrapper %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-drop-dep @@ -192,7 +189,6 @@ mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries * Thu Sep 15 2022 Jens Petersen - 2.5.0-1 - define ghc_smp_mflags to speed up package builds - ghc_configure and ghc_version now respect ghc_name for ghcX.Y (via rpmquery) -- add ghc-info.sh to read fields from ghc --info * Sat Aug 6 2022 Jens Petersen - 2.4.4-2 - F36 obsoletes regex-applicative-text diff --git a/macros.ghc b/macros.ghc index 0851441..b2da3d8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -30,9 +30,9 @@ export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\ if ! [ -f Setup.hs -o -f Setup.lhs ]; then\ cp %{_datadir}/ghc-rpm-macros/Setup.hs .\ fi\ -if [ "$(/usr/lib/rpm/ghc-info.sh %{ghc_version} 'LibDir')" != "%{ghclibdir}" ]; then\ +%if %{with hadrian}\ subsubdir=lib/\ -fi\ +%endif\ %cabal --version\ %cabal configure %{?ghc_name:--with-compiler=%{_bindir}/ghc-%{ghc_version}} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler'/${subsubdir}'$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc --dynlibdir=%{?_ghcdynlibdir}%{?!_ghcdynlibdir:%{_libdir}/ghc-%{ghc_version}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')} -fhide-source-paths" %{?cabal_configure_options} $cabal_configure_extra_options @@ -72,7 +72,7 @@ fi\ # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} -%ghcliblib %{?with_hadrian:%{ghclibdir}/lib}%{!?with_hadrian:%(/usr/lib/rpm/ghc-info.sh %{ghc_version} 'LibDir')} +%ghcliblib %{ghclibdir}%{?with_hadrian:/lib} %_ghclicensedir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}