new ghc_files wrapper macro which takes base doc files as args

- uses new ghc_shared_files and ghc_devel_files macros
epel9
Jens Petersen 13 years ago
parent 72e5db37b5
commit 683aba9d80

@ -88,15 +88,18 @@ Requires(postun): ghc-compiler = %{ghc_version}\
Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\
%endif %endif
%ghc_shared_files\
%if %{undefined ghc_without_shared}\
%files -n %{basepkg} -f %{basepkg}.files\
%{?base_doc_files:%doc %base_doc_files}\
%endif\
%{nil}
# ghc_lib_package [-c cdepslist] [-h pkgdepslist] # ghc_lib_package [-c cdepslist] [-h pkgdepslist]
%ghc_lib_package(c:h:)\ %ghc_lib_package(c:h:)\
%define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\
%define pkgver %{?2}%{!?2:%{version}}\
%define pkgnamever %{pkgname}-%{pkgver}\
%define basepkg ghc-%{pkgname}\ %define basepkg ghc-%{pkgname}\
%if %{undefined ghc_without_shared}\ %ghc_shared_files\
%files -n %{basepkg} -f %{basepkg}.files\
%endif\
\ \
%ghc_package_devel\ %ghc_package_devel\
%{nil} %{nil}
@ -129,6 +132,22 @@ This package provides the shared library.\
# (deprecated) for docs post and postun # (deprecated) for docs post and postun
%ghc_reindex_haddock : %ghc_reindex_haddock :
%ghc_devel_files\
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
%if %{defined ghc_without_shared}\
%{?base_doc_files:%doc %base_doc_files}\
%endif\
%{?devel_doc_files:%doc %devel_doc_files}\
%{nil}
%ghc_files()\
%{?1:%define base_doc_files %*}\
%define basepkg ghc-%{pkg_name}\
%ghc_shared_files\
\
%ghc_devel_files\
%{nil}
# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] # ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
%ghc_package_devel(c:h:l:)\ %ghc_package_devel(c:h:l:)\
%define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\
@ -162,7 +181,7 @@ This package contains the development files.\
%postun -n %{basepkg}-devel\ %postun -n %{basepkg}-devel\
%ghc_pkg_recache\ %ghc_pkg_recache\
\ \
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\ %ghc_devel_files\
%{nil} %{nil}
# ghc_strip_dynlinked # ghc_strip_dynlinked

@ -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.14.3 Version: 0.14.4
Release: 1%{?dist} Release: 1%{?dist}
Summary: Macros for building packages for GHC Summary: Macros for building packages for GHC
@ -59,6 +59,10 @@ EOF
%changelog %changelog
* Thu Dec 15 2011 Jens Petersen <petersen@redhat.com> - 0.14.4-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
* Fri Dec 2 2011 Jens Petersen <petersen@redhat.com> - 0.14.3-1 * Fri Dec 2 2011 Jens Petersen <petersen@redhat.com> - 0.14.3-1
- do not use ghc user config by default when compiling Setup - do not use ghc user config by default when compiling Setup
- do not setup hscolour if without_hscolour defined - do not setup hscolour if without_hscolour defined

Loading…
Cancel
Save