diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 80def68..e1ae941 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -111,25 +111,38 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver: %ghc_package_devel\ %{nil} -# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] -%ghc_binlib_package(c:h:l:x)\ +# ghc_package [-l licensetag] [name] [version] +%ghc_package(l:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ -%{!-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}\ Group: System Environment/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}\ -\ +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")} + +# ghc_description [name] [version] +%ghc_description\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ %description -n %{basepkg}\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ %if %{defined ghc_version} && %{undefined ghc_without_shared}\ This package provides the shared library.\ -%endif\ +%endif + +# 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}\ +%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ +%define basepkg ghc-%{pkgname}\ +%ghc_package\ +\ +%ghc_description\ \ %ghc_lib_package\ %{nil} @@ -155,11 +168,10 @@ This package provides the shared library.\ %ghc_devel_files\ %{nil} -# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] -%ghc_package_devel(c:h:l:)\ +# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] +%ghc_devel_package(c:h:l:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}-devel\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ @@ -176,11 +188,23 @@ Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\ Provides: %{basepkg}-doc = %{pkgver}-%{release}\ Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ -\ + +# ghc_devel_description +%ghc_devel_description\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ %description -n %{basepkg}-devel\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ \ -This package contains the development files.\ +This package contains the development files. + +# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] +%ghc_package_devel(c:h:l:)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ +%ghc_devel_package\ +\ +%ghc_devel_description\ \ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9cd34b1..37f5916 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15 +Version: 0.15.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,7 +59,10 @@ EOF %changelog -* Thu Dec 15 2011 Jens Petersen - 0.15-1 +* Tue Dec 27 2011 Jens Petersen - 0.15.1-1 +- add ghc_package, ghc_description, ghc_devel_package, ghc_devel_description + +* Tue Dec 27 2011 Jens Petersen - 0.15-1 - new ghc_files wrapper macro for files which takes base doc files as args and uses new ghc_shared_files and ghc_devel_files macros - when building for non-shared archs move installed docfiles to devel docdir