ghc_without_shared cleanup: create base package when ghc_without_shared

This commit is contained in:
Jens Petersen 2013-07-11 13:49:27 +09:00
parent cd4926bbba
commit 7417c70757
2 changed files with 16 additions and 17 deletions

View File

@ -72,7 +72,7 @@ done\
%ghc_add_basepkg_file()\
%define basepkg ghc-%{pkg_name}\
echo "%*" >> %{basepkg}%{?ghc_without_shared:-devel}.files
echo "%*" >> %{basepkg}.files
# compiler version
%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override}
@ -92,15 +92,13 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
%ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\
Requires(post): ghc-compiler = %{ghc_version}\
Requires(postun): ghc-compiler = %{ghc_version}\
%if %{undefined ghc_without_shared} && 0%{!?-m:1}\
%if 0%{!?-m:1}\
Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\
%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]
@ -148,16 +146,11 @@ This package provides the shared library.\
%ghc_lib_package\
%{nil}
%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || :
# (deprecated) for docs post and postun
%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}
@ -225,12 +218,6 @@ This package contains the development files.
%ghc_devel_files\
%{nil}
# ghc_strip_dynlinked
%ghc_strip_dynlinked\
%if %{undefined __debug_package}\
find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
%endif
# ghc_bin_build
%ghc_bin_build\
%global debug_package %{nil}\
@ -252,6 +239,12 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
%endif\
%{nil}
# ghc_strip_dynlinked
%ghc_strip_dynlinked\
%if %{undefined __debug_package}\
find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
%endif
# install bin package
%ghc_bin_install()\
%global _use_internal_dependency_generator 0\
@ -288,6 +281,8 @@ done\
%endif\
%{nil}
%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || :
# - without_hscolour, without_testsuite, and ghc_bootstrapping
# need to be set locally in the spec file

View File

@ -6,9 +6,9 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 0.15.13
Version: 0.15.14
Release: 1%{?dist}
Summary: Macros for building packages for GHC
Summary: RPM macros for building packages for GHC
License: GPLv3
URL: https://fedoraproject.org/wiki/Packaging:Haskell
@ -74,6 +74,10 @@ EOF
%changelog
* Thu Jul 11 2013 Jens Petersen <petersen@redhat.com> - 0.15.14-1
- create lib base package also when ghc_without_shared is set (#983137)
and other ghc_without_shared cleanup
* Sat Jul 6 2013 Jens Petersen <petersen@redhat.com> - 0.15.13-1
- restore docdir autopackaging for f17 and el6