fix subpackage builds

if %ghc_subpackaging set configure with --user otherwise --global
epel9
Jens Petersen 8 years ago
parent ae0985a107
commit 89fc8859a1

@ -10,7 +10,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 1.6.13
Version: 1.6.14
Release: 1%{?dist}
Summary: RPM macros for building Haskell packages for GHC
@ -147,6 +147,9 @@ EOF
%changelog
* Fri Feb 10 2017 Jens Petersen <petersen@redhat.com> - 1.6.14-1
- if ghc_subpackaging set configure with --user otherwise --global
* Thu Feb 9 2017 Jens Petersen <petersen@redhat.com> - 1.6.13-1
- build subpackages inside main package directory

@ -117,7 +117,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.
# ghc_lib_build_without_haddock [name] [version]
%ghc_lib_build_without_haddock()\
%global debug_package %{nil}\
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user} %{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
%cabal build %{?cabal_build_options}\
%{nil}

@ -67,7 +67,7 @@ This package provides the Haskell %{pkgname} library development files.\
# ghc_libs_build [name-version] ...
%ghc_libs_build()\
HOME=$PWD\
%define cabal_configure_options --user\
%global ghc_subpackaging 1\
for i in %*; do\
name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\
ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\

Loading…
Cancel
Save