From b78d93fec34de6ff1cd3c98310f98f0afd80fa63 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 13 Sep 2017 19:17:01 +0900 Subject: [PATCH] fix the package.conf existence check --- ghc-rpm-macros.spec | 6 ++++-- macros.ghc | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 30702e7..dd959d3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.7.0 +Version: 1.6.50 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,8 +162,10 @@ EOF %changelog -* Wed Sep 13 2017 Jens Petersen - 1.7.0-1 +* Wed Sep 13 2017 Jens Petersen - 1.6.50-1 - make some macro call args explicit for rpm-4.14 scope change + (this breaks builds with earlier versions of rpm) +- fix the package.conf existence check * Wed Aug 2 2017 Jens Petersen - ghc_gen_filelists: check package.conf exists diff --git a/macros.ghc b/macros.ghc index b8ad29d..4291243 100644 --- a/macros.ghc +++ b/macros.ghc @@ -73,8 +73,8 @@ 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"\ +if [ ! -f %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf ]; then\ +echo "%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found"\ exit 1\ fi\ pkgconf=$(echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf")\