diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9dd5365..314c8d0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -162,6 +162,9 @@ EOF %changelog +* Wed Aug 2 2017 Jens Petersen +- ghc_gen_filelists: check package.conf exists + * Sun Jul 30 2017 Jens Petersen - 1.6.20-2 - make package noarch again for f27 diff --git a/macros.ghc b/macros.ghc index 257bcad..a64b865 100644 --- a/macros.ghc +++ b/macros.ghc @@ -73,6 +73,10 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ +if [ ! -f "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" ]; then\ +echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found"\ +exit 1\ +fi\ pkgconf=$(echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf")\ key=$(grep "key: " %{buildroot}${pkgconf} | sed -e "s/key: //")\ pkgdir="%{ghclibdir}/${key}"\