%ghc_gen_filelists: check package.conf exists

This commit is contained in:
Jens Petersen 2017-08-02 11:00:01 +01:00
parent 4c35941d50
commit 5d5eac137c
2 changed files with 7 additions and 0 deletions

View File

@ -162,6 +162,9 @@ EOF
%changelog
* Wed Aug 2 2017 Jens Petersen <petersen@redhat.com>
- ghc_gen_filelists: check package.conf exists
* Sun Jul 30 2017 Jens Petersen <petersen@redhat.com> - 1.6.20-2
- make package noarch again for f27

View File

@ -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}"\