[ghc-rpm-macros] move configure --htmldir to ghc_lib_build; %ghc_compiler; move %ghc_devel_requires to extra

Jens Petersen petersen at fedoraproject.org
Sat May 4 14:34:55 UTC 2013


commit 1b2339d4077661e1271e0e2b12cdc6ec4bbf0bf4
Author: Jens Petersen <petersen at redhat.com>
Date:   Sat May 4 23:34:41 2013 +0900

    move configure --htmldir to ghc_lib_build; %ghc_compiler; move %ghc_devel_requires to extra
    
    but now I fear that %ghc_compiler needs to be in macros.ghc-srpm for mock/koji

 ghc-rpm-macros.ghc       |   16 ++++++----------
 ghc-rpm-macros.ghc-extra |    6 ++++++
 2 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index 02e42c1..f7b31aa 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -21,7 +21,7 @@ fi
 # configure
 %cabal_configure\
 %ghc_check_bootstrap\
-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options
 
 # install
 %cabal_install %cabal copy --destdir=%{buildroot} -v
@@ -66,6 +66,8 @@ done\
 # compiler version
 %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override}
 
+%ghc_compiler ghc-compiler = %{ghc_version}
+
 # create and install package.conf file
 # cabal_pkg_conf [name] [version]
 %cabal_pkg_conf()\
@@ -77,14 +79,6 @@ mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\
 install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
 %{nil}
 
-# devel pkg basic requires
-%ghc_devel_requires Requires:       ghc-compiler = %{ghc_version}\
-Requires(post): ghc-compiler = %{ghc_version}\
-Requires(postun): ghc-compiler = %{ghc_version}\
-Requires:       ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}
-
-%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-db || :
-
 # ghc_strip_dynlinked
 %ghc_strip_dynlinked\
 %if %{undefined __debug_package}\
@@ -100,7 +94,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
 # 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} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
+%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
 %cabal build\
 %{nil}
 
@@ -148,6 +142,8 @@ done\
 %endif\
 %{nil}
 
+%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-db || :
+
 # - without_hscolour, without_testsuite, and ghc_bootstrapping
 #   need to be set locally in the spec file
 
diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra
index c778293..1b244b7 100644
--- a/ghc-rpm-macros.ghc-extra
+++ b/ghc-rpm-macros.ghc-extra
@@ -64,6 +64,12 @@ Summary:        %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}
 %ghc_devel_files\
 %{nil}
 
+# devel pkg basic requires
+%ghc_devel_requires Requires:       %{ghc_compiler}\
+Requires(post): %{ghc_compiler}\
+Requires(postun): %{ghc_compiler}\
+Requires:       ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}
+
 # ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version]
 #  -m : meta-package
 %ghc_devel_package(c:h:l:m)\


More information about the scm-commits mailing list