- define ghc_version in macros.ghc in place of ghcrequires

- drop ghc-requires script for now
This commit is contained in:
Jens Petersen 2009-04-24 07:28:14 +00:00
parent 7b1f4da984
commit 43b24a206d
3 changed files with 6 additions and 25 deletions

View File

@ -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)

View File

@ -1,21 +0,0 @@
#! /bin/bash
# Author: Till Maas <opensource@till.name>
#
# 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

View File

@ -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 <petersen@redhat.com> - 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 <petersen@redhat.com> - 6.10.2-2
- add ghc-requires rpm script to generate ghc version dependencies
(thanks to Till Maas)