%ghc_lib_subpackage now takes name-version processed with lua
This commit is contained in:
parent
52dc56db34
commit
8539a717fc
@ -10,7 +10,7 @@
|
|||||||
#%%global without_hscolour 1
|
#%%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 1.6.6
|
Version: 1.6.7
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: RPM macros for building packages for GHC
|
Summary: RPM macros for building packages for GHC
|
||||||
|
|
||||||
@ -135,6 +135,9 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 1 2016 Jens Petersen <petersen@redhat.com> - 1.6.7-1
|
||||||
|
- ghc_lib_subpackage now takes name-version processed with lua
|
||||||
|
|
||||||
* Fri Aug 26 2016 Jens Petersen <petersen@redhat.com> - 1.6.6-1
|
* Fri Aug 26 2016 Jens Petersen <petersen@redhat.com> - 1.6.6-1
|
||||||
- ghc_gen_filelists: support packages with more than one license file
|
- ghc_gen_filelists: support packages with more than one license file
|
||||||
- move licenses from docdir to licensedir instead of removing,
|
- move licenses from docdir to licensedir instead of removing,
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
# 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] [-l licensetag] [-x] [name-version]
|
||||||
%ghc_lib_subpackage(c:l:x)\
|
%ghc_lib_subpackage(c:l:x)\
|
||||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
%define pkgname %{lua:\
|
||||||
%define pkgver %{?2}%{!?2:%{version}}\
|
local pv = rpm.expand("%1")\
|
||||||
|
local _, _, name = string.find(pv, "^([%a-]+)-")\
|
||||||
|
print(name)\
|
||||||
|
}\
|
||||||
|
%define pkgver %{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}}}\
|
%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\
|
||||||
%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\
|
%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\
|
||||||
%define basepkg %{ghc_prefix}-%{pkgname}\
|
%define basepkg %{ghc_prefix}-%{pkgname}\
|
||||||
|
Loading…
Reference in New Issue
Block a user