diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index fdf4d20..65c9966 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.9 -Release: 8%{?dist} +Version: 1.6.10 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -146,6 +146,9 @@ EOF %changelog +* Wed Oct 26 2016 Jens Petersen - 1.6.10-1 +- make ghc_lib_subpackage backward compatible with older 2 args form + * Mon Oct 17 2016 Jens Petersen - 1.6.9-8 - disable dynlinking on armv7hl too diff --git a/macros.ghc-extra b/macros.ghc-extra index 7aa80c0..c5cdafc 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -1,16 +1,17 @@ # RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*- # ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name-version] +# for backward compat also support: ghc_lib_subpackage name version %ghc_lib_subpackage(c:l:x)\ -%define pkgname %{lua:\ +%define pkgname %{?2:%{1}}%{!?2:%{lua:\ local pv = rpm.expand("%1")\ local _, _, name = string.find(pv, "^([%a-]+)-")\ print(name)\ -}\ -%define pkgver %{lua:\ +}}\ +%define pkgver %{?2}%{!?2:%{lua:\ local pv = rpm.expand("%1")\ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ -}\ +}}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\