From 902f5f6b3ed37aa697d7bab499ba768dcbe933d21fd73878a03a2e093b488342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Thu, 20 Aug 2015 05:52:45 +0000 Subject: [PATCH] Accepting request 324450 from devel:languages:haskell:lts - update to fake version 1.4.8 - dropped sle-sp1-rpmdeps.patch OBS-URL: https://build.opensuse.org/request/show/324450 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-rpm-macros?expand=0&rev=46 --- fix-gen-filelists.patch | 13 ------- fix-library-dir.patch | 13 +++++++ fix-runpath.patch | 13 +++++++ ghc-rpm-macros-1.4.8.tar.xz | 3 ++ ...e4857a866d19cc59b496846d127b9e8c381.tar.xz | 3 -- ghc-rpm-macros.changes | 6 +++ ghc-rpm-macros.spec | 37 +++++++++---------- remove-flags.patch => ldflags.patch | 6 +-- sle-sp1-rpmdeps.patch | 29 --------------- suse-disable-debug-packages.patch | 9 ++--- suse-docdir.patch | 21 +++++------ version-docdirs.patch | 31 ++++++++++++++++ 12 files changed, 99 insertions(+), 85 deletions(-) delete mode 100644 fix-gen-filelists.patch create mode 100644 fix-library-dir.patch create mode 100644 fix-runpath.patch create mode 100644 ghc-rpm-macros-1.4.8.tar.xz delete mode 100644 ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz rename remove-flags.patch => ldflags.patch (82%) delete mode 100644 sle-sp1-rpmdeps.patch create mode 100644 version-docdirs.patch diff --git a/fix-gen-filelists.patch b/fix-gen-filelists.patch deleted file mode 100644 index f407f0c..0000000 --- a/fix-gen-filelists.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc -=================================================================== ---- ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc -+++ ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc -@@ -66,7 +66,7 @@ tests - rm -f %{basepkg}.files %{basepkg}-devel.files\ - touch %{basepkg}.files %{basepkg}-devel.files\ - if [ -d "%{buildroot}%{pkgdir}" ]; then\ --echo "%dir %{pkgdir}" >> %{basepkg}.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\ diff --git a/fix-library-dir.patch b/fix-library-dir.patch new file mode 100644 index 0000000..319fa5e --- /dev/null +++ b/fix-library-dir.patch @@ -0,0 +1,13 @@ +Index: ghc-rpm-macros-1.3.91/macros.ghc +=================================================================== +--- ghc-rpm-macros-1.3.91.orig/macros.ghc ++++ ghc-rpm-macros-1.3.91/macros.ghc +@@ -24,7 +24,7 @@ fi + # configure + %cabal_configure\ + %ghc_check_bootstrap\ +-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options ++%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options + + # install + %cabal_install %cabal copy --destdir=%{buildroot} -v diff --git a/fix-runpath.patch b/fix-runpath.patch new file mode 100644 index 0000000..d605bd2 --- /dev/null +++ b/fix-runpath.patch @@ -0,0 +1,13 @@ +Index: ghc-rpm-macros-1.3.91/macros.ghc +=================================================================== +--- ghc-rpm-macros-1.3.91.orig/macros.ghc ++++ ghc-rpm-macros-1.3.91/macros.ghc +@@ -135,7 +135,7 @@ PDIR=$(pwd)\ + for i in %*; do\ + PROG=%{buildroot}%{_bindir}/$i\ + if [ -x "$PROG" ]; then\ +- RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\ ++ RPATH=$(chrpath $PROG | sed -e "s@^$PROG: R\\(UN\\)\\?PATH=@@")\ + case $RPATH in\ + *$PDIR*)\ + NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ diff --git a/ghc-rpm-macros-1.4.8.tar.xz b/ghc-rpm-macros-1.4.8.tar.xz new file mode 100644 index 0000000..f6725d0 --- /dev/null +++ b/ghc-rpm-macros-1.4.8.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bab7f3b690f7f67f5dffea486583eb9f99f3c83b39bae6ea50867f8744d4a1a1 +size 23144 diff --git a/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz b/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz deleted file mode 100644 index 0e7f771..0000000 --- a/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d126e6f0c09245d85df09e427e663ec4bb8f0bd0211aeba784fb1e45c9eb88e6 -size 23252 diff --git a/ghc-rpm-macros.changes b/ghc-rpm-macros.changes index cd23d09..050a4a0 100644 --- a/ghc-rpm-macros.changes +++ b/ghc-rpm-macros.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 19 08:08:54 UTC 2015 - mimi.vx@gmail.com + +- update to fake version 1.4.8 +- dropped sle-sp1-rpmdeps.patch + ------------------------------------------------------------------- Tue Apr 14 07:10:18 UTC 2015 - mimi.vx@gmail.com diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f05be83..51e65d9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -16,14 +16,12 @@ # -%global git_hash 81726e4857a866d19cc59b496846d127b9e8c381 - %global macros_dir %{_sysconfdir}/rpm %global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.7 +Version: 1.4.8 Release: 0 BuildArch: noarch Summary: RPM Macros for building packages for GHC @@ -32,7 +30,7 @@ Group: Development/Libraries/Other Url: https://fedoraproject.org/wiki/Haskell_SIG -Source0: http://pkgs.fedoraproject.org/cgit/%{name}.git/snapshot/%{name}-%{git_hash}.tar.xz +Source0: %{name}-%{version}.tar.xz # PATCH-FIX-OPENSUSE suse-disable-debug-packages.patch peter.trommler@ohm-hochschule.de -- openSUSE way to disable debug packages Patch1: suse-disable-debug-packages.patch # PATCH-FIX-OPENSUSE add-group.patch sbahling@suse.com -- Make sure a Group: tag is generated in subpackages; peter.trommler@ohm-hochschule.de: also puts libraries in System/Libraries, see package group guidelines @@ -41,15 +39,17 @@ Patch2: add-group.patch Patch3: files-defattr.patch # PATCH-FIX-OPENSUSE suse-docdir.patch peter.trommler@ohm-hochschule.de -- fix location of docdir Patch4: suse-docdir.patch -# PATCH-FIX_UPSTREAM fix-gen-filelists.patch -Patch5: fix-gen-filelists.patch -# PATCH-FIX-OPENSUSE remove-flags.patch peter.trommler@ohm-hochschule.de -- Do not pass CFLAGS and LDFLAGS to ghc. openSUSE is missing a RPM macro %%__global_ldflags. -Patch8: remove-flags.patch -# PATCH-FIX-SLE sle-sp1-rpmdeps.patch peter.trommler@ohm-hochschule.de -- SLE's RPM is too old in 11 SP1 and SP2 and SP3 -Patch100: sle-sp1-rpmdeps.patch +# PATCH-FIX-UPSTREAM fix-runpath.patch peter.trommler@ohm-hochschule.de -- In openSUSE we patch binutils to default to the "new" RUNPATH dynamic tag and not the obsolete RPATH. This patch adds support for the former and still works for the latter. +Patch7: fix-runpath.patch +# PATCH-FIX-OPENSUSE ldflags.patch peter.trommler@ohm-hochschule.de -- Remove LDFLAGS. TODO: Find the right openSUSE way to do this. +Patch8: ldflags.patch +# PATCH-FIX-UPSTREAM fix-library-dir.patch peter.trommler@ohm-hochschule.de -- Fix ghc-rpm-macros and ghc build system installing into different library directories (package version vs package key). +Patch9: fix-library-dir.patch +# PATCH-FIX-UPSTREAM version-docdir.patch peter.trommler@ohm-hochschule.de -- Include version number in package documentation dir. +Patch10: version-docdirs.patch -BuildRequires: xz Requires: rpm +BuildRequires: xz %if %{undefined without_hscolour} Requires: hscolour %endif @@ -82,16 +82,15 @@ BuildArch: noarch Macros used when generating source Haskell rpm packages. %prep -%setup -q -n %{name}-%{git_hash} +%setup -q %patch1 -p1 -b .debug %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 +%patch7 -p1 %patch8 -p1 -%if 0%{?sles_version} -%patch -P 100 -p2 -%endif +%patch9 -p1 +%patch10 -p1 %build echo no build stage needed @@ -100,8 +99,7 @@ echo no build stage needed install -p -D -m 0644 macros.ghc %{buildroot}%{macros_dir}/macros.ghc install -p -D -m 0644 macros.ghc-extra %{buildroot}/%{macros_dir}/macros.ghc-extra install -p -D -m 0755 ghc-deps.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh -install -p -D -m 0644 ghc_bin.attr %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_bin.attr -install -p -D -m 0644 ghc_lib.attr %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_lib.attr +install -p -D -m 0644 ghc.attr %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr install -p -D -m 0755 cabal-tweak-dep-ver %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 cabal-tweak-flag %{buildroot}/%{_bindir}/cabal-tweak-flag @@ -113,8 +111,7 @@ install -p -D -m 0755 cabal-tweak-flag %{buildroot}/%{_bindir}/cabal-tweak-flag %dir %{_prefix}/lib/rpm %dir %{_prefix}/lib/rpm/fileattrs %endif -%{_prefix}/lib/rpm/fileattrs/ghc_bin.attr -%{_prefix}/lib/rpm/fileattrs/ghc_lib.attr +%{_prefix}/lib/rpm/fileattrs/ghc.attr %{_prefix}/lib/rpm/ghc-deps.sh %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-flag diff --git a/remove-flags.patch b/ldflags.patch similarity index 82% rename from remove-flags.patch rename to ldflags.patch index 0d0c47a..8af41ac 100644 --- a/remove-flags.patch +++ b/ldflags.patch @@ -1,7 +1,7 @@ -Index: ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc +Index: ghc-rpm-macros-1.3.91/macros.ghc =================================================================== ---- ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc -+++ ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc +--- ghc-rpm-macros-1.3.91.orig/macros.ghc ++++ ghc-rpm-macros-1.3.91/macros.ghc @@ -24,9 +24,7 @@ fi # configure %cabal_configure\ diff --git a/sle-sp1-rpmdeps.patch b/sle-sp1-rpmdeps.patch deleted file mode 100644 index a8f96f3..0000000 --- a/sle-sp1-rpmdeps.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git b/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/ghc-deps.sh a/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc-deps.sh -index e3a681e..300315b 100755 ---- b/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/ghc-deps.sh -+++ a/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc-deps.sh -@@ -30,8 +30,8 @@ else - fi - - case $MODE in -- --provides) FIELD=id ;; -- --requires) FIELD=depends ;; -+ --provides) FIELD=id FINDMODE=-provides ;; -+ --requires) FIELD=depends FINDMODE=-requires ;; - *) echo "`basename $0`: Need --provides or --requires" ; exit 1 - esac - -diff --git b/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc a/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc -index 7bf522c..eda73be 100644 ---- b/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc -+++ a/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc -@@ -127,6 +127,9 @@ fi\ - find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ - %endif - -+# SLE does not define _rpmconfigdir (yet) -+%_rpmconfigdir %{_prefix}/lib/rpm -+ - # install bin package - %ghc_bin_install()\ - %cabal_install\ diff --git a/suse-disable-debug-packages.patch b/suse-disable-debug-packages.patch index 3949f5e..5c8d47f 100644 --- a/suse-disable-debug-packages.patch +++ b/suse-disable-debug-packages.patch @@ -1,8 +1,7 @@ -Index: ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc -=================================================================== ---- ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc -+++ ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc -@@ -177,3 +177,13 @@ done\ +Index: ghc-rpm-macros-1.3.91/macros.ghc +--- ghc-rpm-macros-1.3.91.orig/macros.ghc ++++ ghc-rpm-macros-1.3.91/macros.ghc +@@ -157,3 +157,13 @@ done\ %global without_prof 1\ %global without_haddock 1\ %global without_manual 1 diff --git a/suse-docdir.patch b/suse-docdir.patch index ce03854..d96b867 100644 --- a/suse-docdir.patch +++ b/suse-docdir.patch @@ -1,7 +1,7 @@ -Index: ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc +Index: ghc-rpm-macros-1.3.91/macros.ghc =================================================================== ---- ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc -+++ ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc +--- ghc-rpm-macros-1.3.91.orig/macros.ghc ++++ ghc-rpm-macros-1.3.91/macros.ghc @@ -18,6 +18,9 @@ proceeding, to avoid dependency ABI brea %endif\ fi @@ -12,15 +12,12 @@ Index: ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc # configure %cabal_configure\ %ghc_check_bootstrap\ -@@ -35,9 +38,9 @@ tests - %endif +@@ -29,7 +32,7 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; + %cabal_install %cabal copy --destdir=%{buildroot} -v - # root dir for ghc docs (used by ghc.spec) --%ghc_html_dir %{_docdir}/ghc/html -+%ghc_html_dir %{_datadir}/doc/ghc/html - # deprecates + # root dir for ghc docs -%ghcdocbasedir %{_docdir}/ghc/html +%ghcdocbasedir %{_datadir}/doc/ghc/html - - # libraries doc dir (internal) - %ghc_html_libraries_dir %{ghc_html_dir}/libraries + # libraries doc dir + %ghclibdocdir %{ghcdocbasedir}/libraries + # pkg doc dir diff --git a/version-docdirs.patch b/version-docdirs.patch new file mode 100644 index 0000000..42f2ba7 --- /dev/null +++ b/version-docdirs.patch @@ -0,0 +1,31 @@ +Index: ghc-rpm-macros-1.3.91/macros.ghc +=================================================================== +--- ghc-rpm-macros-1.3.91.orig/macros.ghc ++++ ghc-rpm-macros-1.3.91/macros.ghc +@@ -34,7 +34,7 @@ fi + # libraries doc dir + %ghclibdocdir %{ghcdocbasedir}/libraries + # pkg doc dir +-%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name} ++%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name}-%{version} + # top library dir + %ghclibdir %{_libdir}/ghc-%{ghc_version} + +@@ -50,7 +50,7 @@ else\ + keyname=$(echo %{pkgname} | sed -e "s/-//g" | cut -c 1-5)\ + pkgdir=$(ls -d %{buildroot}%{ghclibdir}/${keyname}_* | sed -e "s@^%{buildroot}@@")\ + fi\ +-%define docdir %{ghclibdocdir}/%{pkgname}\ ++%define docdir %{ghclibdocdir}/%{pkgnamever}\ + rm -f %{basepkg}.files %{basepkg}-devel.files\ + if [ -d "%{buildroot}${pkgdir}" ]; then\ + echo "%dir ${pkgdir}" >> %{basepkg}.files\ +@@ -93,7 +93,7 @@ install -D --mode=0644 %{pkgnamever}.con + + # ghc_lib_build_without_haddock [name] [version] + %ghc_lib_build_without_haddock()\ +-%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ ++%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ + %cabal build\ + %{nil} +