You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ghc/ghc-rpm-requires

22 lines
606 B

#! /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