From d739830613f081b8c36dfb7458481d6f3c0df9af Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Jun 21 2013 02:13:58 +0000 Subject: backport fixes including new Packaging Guidelines changes - ghc_fix_dynamic_rpath fix - packaging for without_shared is now done the same way as shared - remove deprecated ghc_exclude_docdir - remove %config(noreplace) - only add lib pkgdir to filelist if it exists --- diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index c385bbb..37feda4 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -42,29 +42,12 @@ fi %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ -echo "%dir %{pkgdir}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ -%if %{undefined ghc_without_shared}\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ +echo "%dir %{pkgdir}" >> %{basepkg}.files\ +%if %{undefined ghc_without_shared}\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ -fi\ -%endif\ -%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 a534f55..d14b1e5 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.95.10 +Version: 0.95.11 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 @@ -68,13 +67,24 @@ EOF %files %doc COPYING AUTHORS -%config(noreplace) %{macros_file} +%{macros_file} %{_prefix}/lib/rpm/ghc-deps.sh %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-flag %changelog +* Fri Jun 21 2013 Jens Petersen - 0.95.11-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 +- Remove %%config from %%{_sysconfdir}/rpm/macros.* + (https://fedorahosted.org/fpc/ticket/259). +- only add lib pkgdir to filelist if it exists + to fix haskell-platform build on secondary archs (no shared libs) + * Tue Jan 22 2013 Jens Petersen - 0.95.10-1 - simplify cabal-tweak-flag script to take one flag value - new ghc_fix_dynamic_rpath macro for cleaning up package executables