[ghc-rpm-macros] add ghcpkgdocdir

Jens Petersen petersen at fedoraproject.org
Tue Oct 15 09:08:16 UTC 2013


commit 4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52
Author: Jens Petersen <petersen at redhat.com>
Date:   Tue Oct 15 18:08:08 2013 +0900

    add ghcpkgdocdir
    
    allows for unversioned haddock dirs similarly to _pkgdocdir

 ghc-rpm-macros.ghc  |    5 +++--
 ghc-rpm-macros.spec |    9 ++++++---
 2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index 314145a..851a978 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -30,6 +30,8 @@ fi
 %ghcdocbasedir %{_docdir}/ghc/html
 # libraries doc dir
 %ghclibdocdir %{ghcdocbasedir}/libraries
+# pkg doc dir
+%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name}
 # top library dir
 %ghclibdir %{_libdir}/ghc-%{ghc_version}
 
@@ -73,8 +75,7 @@ done\
 %define pkgver %{?2}%{!?2:%{version}}\
 %define pkgnamever %{pkgname}-%{pkgver}\
 %cabal register --gen-pkg-config\
-mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\
-install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
+install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\
 %{nil}
 
 # ghc_bin_build
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index 86ebcb1..a6f1e00 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -6,7 +6,7 @@
 #%%global without_hscolour 1
 
 Name:           ghc-rpm-macros
-Version:        1.1.3
+Version:        1.2
 Release:        1%{?dist}
 Summary:        RPM macros for building packages for GHC
 
@@ -57,8 +57,8 @@ echo no build stage needed
 
 
 %install
-install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_dir}/macros.ghc
-install -p -D -m 0644 %{SOURCE6} ${RPM_BUILD_ROOT}/%{macros_dir}/macros.ghc-extra
+install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc
+install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra
 
 install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh
 
@@ -90,6 +90,9 @@ EOF
 
 
 %changelog
+* Tue Oct 15 2013 Jens Petersen <petersen at redhat.com> - 1.2-1
+- add ghcpkgdocdir, which like _pkgdocdir allows for unversioned haddock dirs
+
 * Tue Sep 10 2013 Jens Petersen <petersen at redhat.com> - 1.1.3-1
 - ghc-deps.sh: fix ghc-pkg path when bootstrapping new ghc version
 


More information about the scm-commits mailing list