diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 15edcf1..6103094 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -35,4 +35,4 @@ echo '%{ghcdocdir}' >> %1-doc.files \ %ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : -%ghcrequires() %{expand:%(/usr/lib/rpm/ghc-requires %*)} +%ghc_version %(ghc --numeric-version) diff --git a/ghc-rpm-requires b/ghc-rpm-requires deleted file mode 100644 index 1a01f65..0000000 --- a/ghc-rpm-requires +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/bash -# Author: Till Maas -# -# Use this script as follows in your spec to get versioned -# ghc requires for post and preun: -# -# %{expand:%(/usr/lib/ghc-script-requires.sh ghc post preun)} - -ghc_num_ver=$(ghc --numeric-version) - -PKG=$1 ; shift - -# rpm will run this script once before the BuildRequires are installed -# then it has to report nothing to avoid rpm complainng about the empty version -# after the "ghc =" -if [ -n "${ghc_num_ver}" ]; then - echo "Requires: $PKG = ${ghc_num_ver}" - for script in "$@"; do - echo "Requires(${script}): $PKG = ${ghc_num_ver}" - done -fi diff --git a/ghc.spec b/ghc.spec index 692ad8e..daf2e8d 100644 --- a/ghc.spec +++ b/ghc.spec @@ -16,7 +16,7 @@ Name: ghc Version: 6.10.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Glasgow Haskell Compilation system # fedora ghc has only been bootstrapped on the following archs: ExclusiveArch: %{ix86} x86_64 ppc alpha @@ -26,8 +26,6 @@ Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2 Source1: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src-extralibs.tar.bz2 # /etc/rpm/macros.ghc Source2: ghc-rpm-macros.ghc -# /usr/lib/rpm/ghc-requires -Source3: ghc-rpm-requires URL: http://haskell.org/ghc/ # libedit-devel > 2.11-2 correctly requires ncurses-devel Requires: gcc, gmp-devel, libedit-devel > 2.11-2 @@ -223,6 +221,10 @@ fi %endif %changelog +* Fri Apr 24 2009 Jens Petersen - 6.10.2-3 +- define ghc_version in macros.ghc in place of ghcrequires +- drop ghc-requires script for now + * Sun Apr 19 2009 Jens Petersen - 6.10.2-2 - add ghc-requires rpm script to generate ghc version dependencies (thanks to Till Maas)