diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index e620a83..85f3afc 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -48,20 +48,23 @@ echo "%dir %{pkgdir}" >> %{basepkg}.files\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ fi\ %endif\ -%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\ -if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ - echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ -elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ - echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ -fi\ -%endif\ %if 0%{!?1:1} && %{defined ghc_without_shared}\ if [ "%{name}" = "ghc-%{pkg_name}" ]; then\ if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\ +%if %{undefined ghc_exclude_docdir}\ + echo "%{_docdir}/%{name}-devel-%{version}" >> %{basepkg}-devel.files\ +%endif\ fi\ fi\ %endif\ +%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\ +if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ + echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ +elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ + echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ +fi\ +%endif\ 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\ @@ -273,21 +276,17 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?1:%ghc_strip_dynlinked}\ %{nil} -# skip shared and prof libs, documentation, and testsuite -# - without_hscolour needs to be set locally in the spec file -%ghc_bootstrap\ -%global ghc_without_shared 1\ -%global ghc_without_dynamic 1\ -%global without_prof 1\ -%global without_haddock 1\ -%global without_manual 1\ -%global without_testsuite 1\ -# needs to be set also in ghc.spec\ -%global ghc_bootstrapping 1 +# - without_hscolour, without_testsuite, and ghc_bootstrapping +# need to be set locally in the spec file # skip prof libs, and documentation -# - without_hscolour needs to be set locally in the spec file %ghc_test\ %global without_prof 1\ %global without_haddock 1\ %global without_manual 1 + +# skip shared and prof libs, documentation, and testsuite +%ghc_bootstrap\ +%global ghc_without_shared 1\ +%global ghc_without_dynamic 1\ +%ghc_test diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 303e00a..bccb4c6 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.4 +Version: 0.15.5 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,6 +59,10 @@ EOF %changelog +* Thu Feb 23 2012 Jens Petersen - 0.15.5-1 +- fix handling of devel docdir for non-shared builds +- simplify ghc_bootstrap + * Thu Jan 19 2012 Jens Petersen - 0.15.4-1 - allow dynamic linking of Setup with ghc_without_shared set