Hello community, here is the log from the commit of package ghc-rpm-macros for openSUSE:Factory checked in at 2015-08-23 15:43:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-rpm-macros (Old) and /work/SRC/openSUSE:Factory/.ghc-rpm-macros.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-rpm-macros" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-rpm-macros/ghc-rpm-macros.changes 2015-04-15 16:24:40.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-rpm-macros.new/ghc-rpm-macros.changes 2015-08-23 17:39:06.000000000 +0200 @@ -1,0 +2,12 @@ +Wed Aug 19 08:08:54 UTC 2015 - [email protected] + +- update to fake version 1.4.8 based on 1.3.91 +- dropped: sle-sp1-rpmdeps.patch + fix-gen-filelists.patch + remove-flags.patch +- added patches: ldflags.patch + version-docdirs.patch + fix-runpath.patch + fix-library-dir.patch + +------------------------------------------------------------------- Old: ---- fix-gen-filelists.patch ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz remove-flags.patch sle-sp1-rpmdeps.patch New: ---- fix-library-dir.patch fix-runpath.patch ghc-rpm-macros-1.4.8.tar.xz ldflags.patch version-docdirs.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-rpm-macros.spec ++++++ --- /var/tmp/diff_new_pack.9LGKPx/_old 2015-08-23 17:39:06.000000000 +0200 +++ /var/tmp/diff_new_pack.9LGKPx/_new 2015-08-23 17:39:06.000000000 +0200 @@ -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 @@ 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 [email protected] -- openSUSE way to disable debug packages Patch1: suse-disable-debug-packages.patch # PATCH-FIX-OPENSUSE add-group.patch [email protected] -- Make sure a Group: tag is generated in subpackages; [email protected]: also puts libraries in System/Libraries, see package group guidelines @@ -41,15 +39,17 @@ Patch3: files-defattr.patch # PATCH-FIX-OPENSUSE suse-docdir.patch [email protected] -- 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 [email protected] -- 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 [email protected] -- SLE's RPM is too old in 11 SP1 and SP2 and SP3 -Patch100: sle-sp1-rpmdeps.patch +# PATCH-FIX-UPSTREAM fix-runpath.patch [email protected] -- 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 [email protected] -- Remove LDFLAGS. TODO: Find the right openSUSE way to do this. +Patch8: ldflags.patch +# PATCH-FIX-UPSTREAM fix-library-dir.patch [email protected] -- 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 [email protected] -- 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 @@ 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 @@ 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 @@ %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 ++++++ fix-library-dir.patch ++++++ 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 ++++++ fix-runpath.patch ++++++ 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")\ ++++++ ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz -> ghc-rpm-macros-1.4.8.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/Makefile new/ghc-rpm-macros-1.4.8/Makefile --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/Makefile 2015-01-16 10:21:27.000000000 +0100 @@ -0,0 +1,4 @@ +COPR_REPO = ghc-7.10 + +include ../common/common.mk + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/README new/ghc-rpm-macros-1.4.8/README --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/README 1970-01-01 01:00:00.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/README 2015-01-16 10:21:27.000000000 +0100 @@ -0,0 +1,8 @@ +This repo is for experimental packaging of Fedora Haskell packages. + +It is currently used in https://copr.fedoraproject.org/coprs/petersen/ghc-7.8/ + +Changes to packaging may be first tested here +before getting merged into Fedora Package git, +and changes from there should also be merged here +to keep up this repo up to date. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/cabal-tweak-flag new/ghc-rpm-macros-1.4.8/cabal-tweak-flag --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/cabal-tweak-flag 2015-02-01 08:56:35.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/cabal-tweak-flag 2015-01-16 10:21:27.000000000 +0100 @@ -29,7 +29,7 @@ fi if ! grep -q -i "^flag *$FLAG" $CABALFILE; then - echo "$CABALFILE does not have flag $FLAG" + echo "$CABALFILE does have flag $FLAG" exit 1 fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc-deps.sh new/ghc-rpm-macros-1.4.8/ghc-deps.sh --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc-deps.sh 2015-02-01 08:56:35.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/ghc-deps.sh 2015-01-16 10:21:27.000000000 +0100 @@ -1,12 +1,11 @@ #!/bin/sh -# find rpm provides and requires for Haskell GHC libraries +# find rpm requires for Haskell GHC libraries -[ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 +[ $# -ne 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghclibdir}" && exit 1 set +x -MODE=$1 -PKGBASEDIR=$2 +PKGBASEDIR=$1 PKGCONFDIR=$PKGBASEDIR/package.conf.d GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) @@ -15,73 +14,37 @@ if [ -x "$INPLACE_GHCPKG" ]; then case $GHC_VER in - 7.8.*) - GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" + 7.4.*) + GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR" ;; 7.6.*) GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" ;; + # 7.8+ *) - GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR" + GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" ;; esac else GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER}" fi -case $MODE in - --provides) FIELD=id ;; - --requires) FIELD=depends ;; - *) echo "`basename $0`: Need --provides or --requires" ; exit 1 -esac - -if [ -d "$PKGBASEDIR" ]; then - SHARED=$(find $PKGBASEDIR -type f -name '*.so') -fi - files=$(cat) for i in $files; do - LIB_FILE=$(echo $i | grep /libHS | egrep -v "/libHSrts") - if [ "$LIB_FILE" ]; then - if [ -d "$PKGCONFDIR" ]; then - META="" - SELF="" - case $LIB_FILE in - *.so) META=ghc ;; - *.a) META=ghc-devel - if [ "$SHARED" ]; then - SELF=ghc - fi - ;; - esac - if [ "$META" ]; then - PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%") - HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") - for i in $HASHS; do - case $i in - *-*) echo "$META($i)" ;; - *) ;; - esac - done - if [ "$MODE" = "--requires" -a "$SELF" ]; then - HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") - for i in $HASHS; do - echo "$SELF($i)" - done - fi - fi - fi - elif [ "$MODE" = "--requires" ]; then - if file $i | grep -q 'executable, .* dynamically linked'; then - BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}.so%\1%") - if [ -d "$PKGCONFDIR" ]; then - PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" - fi - for p in ${BIN_DEPS}; do - HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//" | uniq) - echo "ghc($HASH)" + case $i in + # exclude builtin_rts.conf + $PKGCONFDIR/*-*.conf) + PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\)-.\+.conf%\1%") + DEPS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER depends | sed -e "s/^depends: \+//" -e "s/builtin_rts//" -e "s/\(bin-package-db\|ghc-prim\|integer-gmp\)-[^ ]\+//") + for d in $DEPS; do + case $d in + *-*) echo "$d" | sed -e "s%\(.\+\)-\(.\+\)-.\+%ghc-\1-devel = \2%" ;; + *) ;; + esac done - fi - fi + ;; + *) + ;; + esac done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc-rpm-macros.spec new/ghc-rpm-macros-1.4.8/ghc-rpm-macros.spec --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc-rpm-macros.spec 2015-02-01 08:56:35.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/ghc-rpm-macros.spec 2015-01-16 10:21:27.000000000 +0100 @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.8 +Version: 1.3.91 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -24,8 +24,7 @@ Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag Source6: macros.ghc-extra -Source7: ghc_bin.attr -Source8: ghc_lib.attr +Source7: ghc.attr Requires: ghc-srpm-macros # macros.ghc-srpm moved out from redhat-rpm-config-21 Requires: redhat-rpm-config > 20-1.fc21 @@ -66,8 +65,7 @@ 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 -install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_bin.attr -install -p -D -m 0644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_lib.attr +install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag @@ -76,8 +74,7 @@ %files %doc COPYING AUTHORS %{macros_dir}/macros.ghc -%{_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 @@ -88,41 +85,13 @@ %changelog -* Sun Feb 1 2015 Jens Petersen <[email protected]> - 1.4.8-1 -- drop cabal_tests_not_working since not all tests failing on ARMv7 - -* Sat Jan 31 2015 Jens Petersen <[email protected]> - 1.4.7-1 -- fix arch for cabal_tests_not_working -- add cabal_test macro which uses it - -* Sat Jan 31 2015 Jens Petersen <[email protected]> - 1.4.6-1 -- disable Cabal tests on armv7 since they give an internal error - https://ghc.haskell.org/trac/ghc/ticket/10029 -- fix building of meta packages: -- only run cabal haddock for real libraries with modules -- make sure basepkg.files is also created for meta packages - -* Sat Jan 31 2015 Jens Petersen <[email protected]> - 1.4.5-1 -- fix the R*PATH regexp - -* Sat Jan 31 2015 Jens Petersen <[email protected]> - 1.4.4-1 -- ghc_fix_dynamic_rpath: on ARMv7 RPATH is RUNPATH - -* Thu Jan 22 2015 Jens Petersen <[email protected]> - 1.4.3-1 -- version ghcpkgdocdir -- add new names ghc_html_dir, ghc_html_libraries_dir, and ghc_html_pkg_dir - -* Thu Jan 22 2015 Jens Petersen <[email protected]> - 1.4.2-1 -- correct cabal-tweak-flag error message for missing flag (#1184508) - -* Sat Jan 17 2015 Jens Petersen <[email protected]> - 1.4.1-1 -- revert to versioned doc htmldirs - -* Sat Jan 17 2015 Jens Petersen <[email protected]> - 1.4.0-1 -- enable shared libraries and dynamic linking on all arch's - since ghc-7.8 now supports that -- disable debuginfo until ghc-7.10 which will support dwarf debugging output - (#1138982) +* Fri Jan 16 2015 Jens Petersen <[email protected]> - 1.3.91-1 +- rebase to rawhide 1.3.10 +- changes needed for ghc-7.10: +- update ghc_gen_filelists to use new keyed library filepaths + and specify libHS*.so more loosely +- ghc-dep.sh now just makes versioned devel reqs +- rename ghc_lib.attr to ghc.attr and drop ghc_bin.attr * Fri Nov 14 2014 Jens Petersen <[email protected]> - 1.3.10-1 - split ghc.attr into ghc_lib.attr and ghc_bin.attr for finer grained handling diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc.attr new/ghc-rpm-macros-1.4.8/ghc.attr --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc.attr 1970-01-01 01:00:00.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/ghc.attr 2015-01-16 10:21:27.000000000 +0100 @@ -0,0 +1,2 @@ +%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir} +%__ghc_path ^%{ghclibdir}/package.conf.d/.*\.conf$ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc_bin.attr new/ghc-rpm-macros-1.4.8/ghc_bin.attr --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc_bin.attr 2015-02-01 08:56:35.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/ghc_bin.attr 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -%__ghc_bin_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_bin_magic executable, .* dynamically linked -%__ghc_bin_flags exeonly diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc_lib.attr new/ghc-rpm-macros-1.4.8/ghc_lib.attr --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/ghc_lib.attr 2015-02-01 08:56:35.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/ghc_lib.attr 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -%__ghc_lib_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} -%__ghc_lib_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_lib_path ^%{ghclibdir}/.*/libHS.*\\.(so|a)$ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc new/ghc-rpm-macros-1.4.8/macros.ghc --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc 2015-02-01 08:56:35.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/macros.ghc 2015-01-16 10:21:27.000000000 +0100 @@ -28,27 +28,12 @@ # install %cabal_install %cabal copy --destdir=%{buildroot} -v -tests -%cabal_test\ -%if %{with tests}\ -%cabal test\ -%endif - -# root dir for ghc docs (used by ghc.spec) -%ghc_html_dir %{_docdir}/ghc/html -# deprecates +# root dir for ghc docs %ghcdocbasedir %{_docdir}/ghc/html - -# libraries doc dir (internal) -%ghc_html_libraries_dir %{ghc_html_dir}/libraries -# deprecates +# libraries doc dir %ghclibdocdir %{ghcdocbasedir}/libraries - # pkg doc dir -%ghc_html_pkg_dir %{ghc_html_libraries_dir}/%{pkg_name}-%{version} -# deprecates -%ghcpkgdocdir %{ghclibdocdir}/%{pkg_name}-%{version} - +%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name} # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} @@ -58,20 +43,24 @@ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ -%define pkgdir %{ghclibdir}/%{pkgnamever}\ -%define docdir %{ghclibdocdir}/%{pkgnamever}\ +if [ "%{pkgname}" = "rts" ]; then\ +pkgdir=%{ghclibdir}/rts\ +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}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ -touch %{basepkg}.files %{basepkg}-devel.files\ -if [ -d "%{buildroot}%{pkgdir}" ]; then\ -echo "%dir %{pkgdir}" >> %{basepkg}.files\ +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\ +echo "%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ %endif\ fi\ 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\ -find %{buildroot}%{pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ +if [ -d "%{buildroot}${pkgdir}" ]; then\ +find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ +find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ @@ -98,14 +87,12 @@ # ghc_bin_build %ghc_bin_build\ -%global debug_package %{nil}\ %cabal_configure\ %cabal build # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ -%global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-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_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 build\ %{nil} @@ -113,11 +100,7 @@ %ghc_lib_build()\ %ghc_lib_build_without_haddock\ %if %{undefined without_haddock}\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ -if [ -f dist/build/libHS%{pkgname}-%{pkgver}.a ]; then\ %cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle\ -fi\ %endif\ %{nil} @@ -147,12 +130,9 @@ if ! type chrpath > /dev/null; then exit 1; fi\ PDIR=$(pwd)\ for i in %*; do\ - case $i in\ - /*) PROG=%{buildroot}$i ;;\ - *) PROG=%{buildroot}%{_bindir}/$i ;;\ - esac\ + PROG=%{buildroot}%{_bindir}/$i\ if [ -x "$PROG" ]; then\ - RPATH=$(chrpath $PROG | sed -e "s@^$PROG: R.*PATH=@@")\ + RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\ case $RPATH in\ *$PDIR*)\ NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/tests/test-rebuild.sh new/ghc-rpm-macros-1.4.8/tests/test-rebuild.sh --- old/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/tests/test-rebuild.sh 2015-02-01 08:56:35.000000000 +0100 +++ new/ghc-rpm-macros-1.4.8/tests/test-rebuild.sh 2015-01-16 10:21:27.000000000 +0100 @@ -24,7 +24,7 @@ if [ -f /etc/os-release ]; then eval $(grep VERSION_ID /etc/os-release) case $VERSION_ID in - 22) BRANCH=master ;; + 21) BRANCH=master ;; 7.*) BRANCH=el7 ;; *) BRANCH="f$VERSION_ID" ;; esac ++++++ ldflags.patch ++++++ 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,9 +24,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ -LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ -%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} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%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 # install %cabal_install %cabal copy --destdir=%{buildroot} -v ++++++ suse-disable-debug-packages.patch ++++++ --- /var/tmp/diff_new_pack.9LGKPx/_old 2015-08-23 17:39:07.000000000 +0200 +++ /var/tmp/diff_new_pack.9LGKPx/_new 2015-08-23 17:39:07.000000000 +0200 @@ -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 ++++++ suse-docdir.patch ++++++ --- /var/tmp/diff_new_pack.9LGKPx/_old 2015-08-23 17:39:07.000000000 +0200 +++ /var/tmp/diff_new_pack.9LGKPx/_new 2015-08-23 17:39:07.000000000 +0200 @@ -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 @@ # 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 ++++++ version-docdirs.patch ++++++ 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}
