add ghc_package, ghc_description, ghc_devel_package, ghc_devel_description

epel9
Jens Petersen 13 years ago
parent 227b33e94e
commit 19872dc6fe

@ -111,25 +111,38 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:
%ghc_package_devel\ %ghc_package_devel\
%{nil} %{nil}
# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] # ghc_package [-l licensetag] [name] [version]
%ghc_binlib_package(c:h:l:x)\ %ghc_package(l:)\
%define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\
%define pkgver %{?2}%{!?2:%{version}}\ %define pkgver %{?2}%{!?2:%{version}}\
%define pkgnamever %{pkgname}-%{pkgver}\
%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\
%define basepkg ghc-%{pkgname}\ %define basepkg ghc-%{pkgname}\
%package -n %{basepkg}\ %package -n %{basepkg}\
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
Group: System Environment/Libraries\ Group: System Environment/Libraries\
%{?1:Version: %{pkgver}}\ %{?1:Version: %{pkgver}}\
%{-l:License: %{-l*}}\ %{-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}\ %description -n %{basepkg}\
%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
%if %{defined ghc_version} && %{undefined ghc_without_shared}\ %if %{defined ghc_version} && %{undefined ghc_without_shared}\
This package provides the shared library.\ 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\ %ghc_lib_package\
%{nil} %{nil}
@ -155,11 +168,10 @@ This package provides the shared library.\
%ghc_devel_files\ %ghc_devel_files\
%{nil} %{nil}
# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] # ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
%ghc_package_devel(c:h:l:)\ %ghc_devel_package(c:h:l:)\
%define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\
%define pkgver %{?2}%{!?2:%{version}}\ %define pkgver %{?2}%{!?2:%{version}}\
%define pkgnamever %{pkgname}-%{pkgver}\
%define basepkg ghc-%{pkgname}\ %define basepkg ghc-%{pkgname}\
%package -n %{basepkg}-devel\ %package -n %{basepkg}-devel\
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\
@ -176,11 +188,23 @@ Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\
Provides: %{basepkg}-doc = %{pkgver}-%{release}\ Provides: %{basepkg}-doc = %{pkgver}-%{release}\
Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\
Provides: %{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\ %description -n %{basepkg}-devel\
%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ %{?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\ %post -n %{basepkg}-devel\
%ghc_pkg_recache\ %ghc_pkg_recache\

@ -3,7 +3,7 @@
%global macros_file %{_sysconfdir}/rpm/macros.ghc %global macros_file %{_sysconfdir}/rpm/macros.ghc
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 0.15 Version: 0.15.1
Release: 1%{?dist} Release: 1%{?dist}
Summary: Macros for building packages for GHC Summary: Macros for building packages for GHC
@ -59,7 +59,10 @@ EOF
%changelog %changelog
* Thu Dec 15 2011 Jens Petersen <petersen@redhat.com> - 0.15-1 * Tue Dec 27 2011 Jens Petersen <petersen@redhat.com> - 0.15.1-1
- add ghc_package, ghc_description, ghc_devel_package, ghc_devel_description
* Tue Dec 27 2011 Jens Petersen <petersen@redhat.com> - 0.15-1
- new ghc_files wrapper macro for files which takes base doc files as args - 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 and uses new ghc_shared_files and ghc_devel_files macros
- when building for non-shared archs move installed docfiles to devel docdir - when building for non-shared archs move installed docfiles to devel docdir

Loading…
Cancel
Save