From a848de7b31653f760dc10d9a2836c0ec2ab3ab3c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 16 Jul 2019 16:05:34 +0000 Subject: [PATCH] add pkg-doc.files initial use-case: adding ghc-prim and integer-gmp to base --- macros.ghc | 7 ++++--- macros.ghc-extra | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/macros.ghc b/macros.ghc index f20863c..e4f7fc5 100644 --- a/macros.ghc +++ b/macros.ghc @@ -73,8 +73,8 @@ if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf)" ]; t echo '%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found'\ exit 1\ fi\ -rm -f %{basepkg}.files\ -touch %{basepkg}.files\ +rm -f %{basepkg}.files %{basepkg}-doc.files\ +touch %{basepkg}.files %{basepkg}-doc.files\ ls %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so >> %{basepkg}.files\ pkgdir="%{ghclibdir}/%{pkgnamever}"\ if [ -d "%{buildroot}${pkgdir}" ]; then\ @@ -84,7 +84,8 @@ rm -f %{basepkg}-devel.files %{basepkg}-prof.files\ touch %{basepkg}-devel.files %{basepkg}-prof.files\ fi\ ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ -for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-prof.files; do\ +echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\ +for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-doc.files %{basepkg}-prof.files; do\ if [ -f "$i" ]; then\ sed -i -e "s!%{buildroot}!!g" $i\ fi\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 9877eeb..c8b8e38 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -12,7 +12,6 @@ print(name)\ local pv = rpm.expand("%1")\ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ }}\ -%define pkgnamever %{pkgname}-%{pkgver}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\ @@ -69,8 +68,7 @@ This package provides the Haskell %{pkgname} profiling library.\ %files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\ \ %if %{undefined without_haddock}\ -%files -n %{basepkg}-doc\ -%{ghc_html_libraries_dir}/%{pkgnamever}\ +%files -n %{basepkg}-doc -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-doc.files\ %endif\ \ %if %{undefined without_prof}\