to Till Maas) - update macros.ghc: - add %%ghcrequires to call above script - pkg_libdir and pkg_docdir no longer to appear in packages and replaced by ghcpkgdir and ghcdocdir inside macros.ghc - make filelist also for docsepel9
parent
1b7e30e4b7
commit
7b1f4da984
@ -0,0 +1,21 @@
|
|||||||
|
#! /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
|
Loading…
Reference in new issue