[ghc-rpm-macros] make sure license is in binlib shared subpackage and add option to exclude package from ghc_packages

Jens Petersen petersen at fedoraproject.org
Thu Jan 20 08:28:33 UTC 2011


commit 4d6720d40ff8c1f4b705adfc8a82f3a78ba20027
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Jan 20 18:25:37 2011 +1000

    make sure license is in binlib shared subpackage and add option to exclude package from ghc_packages_list
    
    - put docdir (license) also into shared lib subpackage
    - add ghc_binlib_package option to exclude package from ghc_packages_list
    - condition lib base package additional description for srpm

 ghc-rpm-macros.ghc  |   13 ++++++++-----
 ghc-rpm-macros.spec |    9 +++++++--
 2 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index a5e6614..2386f03 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -10,7 +10,7 @@
 
 # root dir for ghc docs
 %ghcdocbasedir %{_docdir}/ghc/html
-# (deprecated) pkg doc dir
+# (deprecated) pkg doc dir - still used in cabal_configure
 %ghcdocdir %{ghcdocbasedir}/libraries/%{pkg_name}-%{version}
 # top library dir
 %ghclibdir %{_libdir}/ghc-%{ghc_version}
@@ -37,6 +37,9 @@ echo "%defattr(-,root,root,-)" > %{basepkg}-devel.files\
 if [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\
 echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?without_shared:-devel}.files\
 fi\
+if [ -d "%{buildroot}%{_docdir}/%{pkgnamever}" ]; then\
+echo "%{_docdir}/%{pkgnamever}" >> %{basepkg}%{?without_shared:-devel}.files\
+fi\
 echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
 if [ -d "%{buildroot}%{pkgdir}" ]; then\
 find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
@@ -93,12 +96,12 @@ Requires:       ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:
 %ghc_package_prof\
 %{nil}
 
-# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
-%ghc_binlib_package(c:h:l:)\
+# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version]
+%ghc_binlib_package(c:h:l:x)\
 %define pkgname %{?1}%{!?1:%{pkg_name}}\
 %define pkgver %{?2}%{!?2:%{version}}\
 %define pkgnamever %{pkgname}-%{pkgver}\
-%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}\
+%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\
 %define basepkg ghc-%{pkgname}\
 %package -n %{basepkg}\
 Summary:        %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
@@ -109,7 +112,7 @@ Group:          System Environment/Libraries\
 %description -n %{basepkg}\
 %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
 \
-%if 0%{!?without_shared:1}\
+%if 0%{?ghc_version:%{!?without_shared:1}}\
 This package provides the shared library.\
 %endif\
 \
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index f089c48..5f91ba7 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -1,5 +1,5 @@
 Name:		ghc-rpm-macros
-Version:	0.11.1
+Version:	0.11.2
 Release:	1%{?dist}
 Summary:	Macros for building packages for GHC
 
@@ -47,6 +47,11 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm
 
 
 %changelog
+* Thu Jan 20 2011 Jens Petersen <petersen at redhat.com> - 0.11.2-1
+- put docdir (license) also into shared lib subpackage
+- add ghc_binlib_package option to exclude package from ghc_packages_list
+- condition lib base package additional description for srpm
+
 * Mon Jan  3 2011 Jens Petersen <petersen at redhat.com> - 0.11.1-1
 - use buildroot instead of RPM_BUILD_ROOT
 - rename ghcpkgbasedir to ghclibdir
@@ -64,7 +69,7 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm
 * Mon Dec 20 2010 Jens Petersen <petersen at redhat.com> - 0.10.3-1
 - revert disabling debug_package, since with redhat-rpm-config installed
   the behaviour depended on the position of ghc_lib_package in the spec file
-  (reported by narasim_7)
+  (reported by narasim)
 
 * Fri Nov 26 2010 Jens Petersen <petersen at redhat.com>
 - drop with_devhelp since --html-help option gone from haddock-2.8.0


More information about the scm-commits mailing list