fix handling of ghc's .files with new ghc_lib_subpackage -d option

This commit is contained in:
Jens Petersen 2017-02-13 19:25:12 +09:00
parent 89fc8859a1
commit f1517cd581
3 changed files with 9 additions and 6 deletions

View File

@ -10,7 +10,7 @@
#%%global without_hscolour 1 #%%global without_hscolour 1
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 1.6.14 Version: 1.6.15
Release: 1%{?dist} Release: 1%{?dist}
Summary: RPM macros for building Haskell packages for GHC Summary: RPM macros for building Haskell packages for GHC
@ -147,6 +147,9 @@ EOF
%changelog %changelog
* Mon Feb 13 2017 Jens Petersen <petersen@redhat.com> - 1.6.15-1
- fix handling of ghc's .files with new ghc_lib_subpackage -d option
* Fri Feb 10 2017 Jens Petersen <petersen@redhat.com> - 1.6.14-1 * Fri Feb 10 2017 Jens Petersen <petersen@redhat.com> - 1.6.14-1
- if ghc_subpackaging set configure with --user otherwise --global - if ghc_subpackaging set configure with --user otherwise --global

View File

@ -1,8 +1,8 @@
# RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*- # RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*-
# ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name-version] # ghc_lib_subpackage [-c cdepslist] [-d] [-l licensetag] [-x] [name-version]
# for backward compat also support: ghc_lib_subpackage name version # for backward compat also support: ghc_lib_subpackage name version
%ghc_lib_subpackage(c:l:x)\ %ghc_lib_subpackage(c:dl:x)\
%define pkgname %{?2:%{1}}%{!?2:%{lua:\ %define pkgname %{?2:%{1}}%{!?2:%{lua:\
local pv = rpm.expand("%1")\ local pv = rpm.expand("%1")\
local _, _, name = string.find(pv, "^([%a-]+)-")\ local _, _, name = string.find(pv, "^([%a-]+)-")\
@ -51,13 +51,13 @@ This package provides the Haskell %{pkgname} library development files.\
%postun -n %{basepkg}-devel\ %postun -n %{basepkg}-devel\
%ghc_pkg_recache\ %ghc_pkg_recache\
\ \
%files -n %{basepkg} -f %{pkgname}-%{pkgver}/%{basepkg}.files\ %files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\
%if 0%{?rhel} && 0%{?rhel} < 7\ %if 0%{?rhel} && 0%{?rhel} < 7\
%defattr(-,root,root,-)\ %defattr(-,root,root,-)\
%endif\ %endif\
%{?base_doc_files:%doc %base_doc_files}\ %{?base_doc_files:%doc %base_doc_files}\
\ \
%files -n %{basepkg}-devel -f %{pkgname}-%{pkgver}/%{basepkg}-devel.files\ %files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\
%if 0%{?rhel} && 0%{?rhel} < 7\ %if 0%{?rhel} && 0%{?rhel} < 7\
%defattr(-,root,root,-)\ %defattr(-,root,root,-)\
%endif\ %endif\