[ghc-rpm-macros/f19] backport some changes for new simplified Packaging from rawhide

Jens Petersen petersen at fedoraproject.org
Thu Jun 20 09:05:04 UTC 2013


commit d204890e6aa53ccecbdb489d1af7253c5fda58e9
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Jun 20 18:04:41 2013 +0900

    backport some changes for new simplified Packaging from rawhide
    
    - ghc_fix_dynamic_rpath fix
    - packaging for without_shared is now done the same way as shared
    - remove deprecated ghc_exclude_docdir

 ghc-rpm-macros.ghc  |   25 +++----------------------
 ghc-rpm-macros.spec |   14 ++++++++++----
 2 files changed, 13 insertions(+), 26 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index ea3aa91..d667f30 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -43,28 +43,11 @@ fi
 %define docdir %{ghclibdocdir}/%{pkgnamever}\
 rm -f %{basepkg}.files %{basepkg}-devel.files\
 if [ -d "%{buildroot}%{pkgdir}" ]; then\
-echo "%dir %{pkgdir}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
+echo "%dir %{pkgdir}" >> %{basepkg}.files\
 %if %{undefined ghc_without_shared}\
 echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\
 %endif\
 fi\
-%if %{defined ghc_without_shared}\
-if [ "%{name}" = "%{basepkg}" -o -n "%{?1}" ]; then\
-  if [ -d "%{buildroot}%{_docdir}/%{basepkg}-%{pkgver}" ]; then\
-    mv %{buildroot}%{_docdir}/%{basepkg}-%{pkgver} %{buildroot}%{_docdir}/%{basepkg}-devel-%{pkgver}\
-%if %{undefined ghc_exclude_docdir}\
-    echo "%{_docdir}/%{basepkg}-devel-%{version}" >> %{basepkg}-devel.files\
-%endif\
-  fi\
-fi\
-%endif\
-%if %{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} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
@@ -73,7 +56,7 @@ fi\
 if [ -d "%{buildroot}%{docdir}" ]; then\
 echo "%{docdir}" >> %{basepkg}-devel.files\
 fi\
-for i in %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files; do\
+for i in %{basepkg}.files %{basepkg}-devel.files; do\
 if [ -f "$i" ]; then\
 sed -i -e "s!%{buildroot}!!g" $i\
 fi\
@@ -289,7 +272,7 @@ for i in %*; do\
   PROG=%{buildroot}%{_bindir}/$i\
   RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\
   case $RPATH in\
-    $PDIR*)\
+    *$PDIR*)\
       NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\
       chrpath -r $NEWRPATH $PROG\
       ;;\
@@ -312,5 +295,3 @@ done\
 %global ghc_without_shared 1\
 %global ghc_without_dynamic 1\
 %ghc_test
-
-%ghc_exclude_docdir 1
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index 750b4c3..b315914 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -6,13 +6,12 @@
 #%%global without_hscolour 1
 
 Name:           ghc-rpm-macros
-Version:        0.98.1
-Release:        4%{?dist}
+Version:        0.98.2
+Release:        1%{?dist}
 Summary:        Macros for building packages for GHC
 
-Group:          Development/Libraries
 License:        GPLv3
-URL:            https://fedoraproject.org/wiki/Haskell_SIG
+URL:            https://fedoraproject.org/wiki/Packaging:Haskell
 
 # This is a Fedora maintained package, originally made for
 # the distribution.  Hence the source is currently only available
@@ -75,6 +74,13 @@ EOF
 
 
 %changelog
+* Thu Jun 20 2013 Jens Petersen <petersen at redhat.com> - 0.98.2-1
+- ghc_fix_dynamic_rpath: do not assume first RPATH
+- packaging for without_shared is now done the same way as shared
+  to make non-shared arch packages same as shared ones:
+  so all archs will now have base library binary packages
+- remove deprecated ghc_exclude_docdir
+
 * Wed Mar 20 2013 Ralf Corsépius <corsepiu at fedoraproject.org> - 0.98.1-4
 - Remove %%config from %%{_sysconfdir}/rpm/macros.*
   (https://fedorahosted.org/fpc/ticket/259).


More information about the scm-commits mailing list