Accepting request 327593 from devel:languages:haskell

1

OBS-URL: https://build.opensuse.org/request/show/327593
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ghc-rpm-macros?expand=0&rev=22
This commit is contained in:
Stephan Kulow 2015-08-28 06:27:41 +00:00 committed by Git OBS Bridge
commit 481cbcf619
13 changed files with 104 additions and 97 deletions

View File

@ -1,20 +1,20 @@
Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra Index: ghc-rpm-macros-1.4.93/macros.ghc-extra
=================================================================== ===================================================================
--- ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc-extra --- ghc-rpm-macros-1.4.93.orig/macros.ghc-extra
+++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra +++ ghc-rpm-macros-1.4.93/macros.ghc-extra
@@ -8,6 +8,7 @@ @@ -9,6 +9,7 @@
%define basepkg ghc-%{pkgname}\ %define basepkg %{ghc_prefix}-%{pkgname}\
%package -n %{basepkg}\ %package -n %{basepkg}\
Summary: Haskell %{pkgname} library\ Summary: Haskell %{pkgname} library\
+Group: System/Libraries\ +Group: System/Libraries\
%{?1:Version: %{pkgver}}\ %{?1:Version: %{pkgver}}\
%{-l:License: %{-l*}}\ %{-l:License: %{-l*}}\
Url: http://hackage.haskell.org/package/%{pkgname}\ Url: http://hackage.haskell.org/package/%{pkgname}\
@@ -18,6 +19,7 @@ This package provides the Haskell %{pkgn @@ -19,6 +20,7 @@ This package provides the Haskell %{pkgn
\ \
%package -n %{basepkg}-devel\ %package -n %{basepkg}-devel\
Summary: Haskell %{pkgname} library development files\ Summary: Haskell %{pkgname} library development files\
+Group: Development/Languages/Other\ +Group: Development/Languages/Other\
%{?1:Version: %{pkgver}}\ %{?1:Version: %{pkgver}}\
%{-l:License: %{-l*}}\ %{-l:License: %{-l*}}\
Requires(post): ghc-compiler = %{ghc_version}\ Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\

View File

@ -1,8 +1,8 @@
Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra Index: ghc-rpm-macros-1.4.93/macros.ghc-extra
=================================================================== ===================================================================
--- ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc-extra --- ghc-rpm-macros-1.4.93.orig/macros.ghc-extra
+++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra +++ ghc-rpm-macros-1.4.93/macros.ghc-extra
@@ -39,8 +39,10 @@ This package provides the Haskell %{pkgn @@ -40,8 +40,10 @@ This package provides the Haskell %{pkgn
%ghc_pkg_recache\ %ghc_pkg_recache\
\ \
%files -n %{basepkg} -f %{basepkg}.files\ %files -n %{basepkg} -f %{basepkg}.files\

13
fix-gen-filelists.patch Normal file
View File

@ -0,0 +1,13 @@
Index: ghc-rpm-macros-1.4.93/macros.ghc
===================================================================
--- ghc-rpm-macros-1.4.93.orig/macros.ghc
+++ ghc-rpm-macros-1.4.93/macros.ghc
@@ -77,7 +77,7 @@ fi\
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*-ghc%{ghc_version}.so" >> %{basepkg}.files\
%endif\

View File

@ -1,11 +1,11 @@
Index: ghc-rpm-macros-1.3.91/macros.ghc Index: ghc-rpm-macros-1.4.93/macros.ghc
=================================================================== ===================================================================
--- ghc-rpm-macros-1.3.91.orig/macros.ghc --- ghc-rpm-macros-1.4.93.orig/macros.ghc
+++ ghc-rpm-macros-1.3.91/macros.ghc +++ ghc-rpm-macros-1.4.93/macros.ghc
@@ -24,7 +24,7 @@ fi @@ -26,7 +26,7 @@ fi
# configure
%cabal_configure\ %cabal_configure\
%ghc_check_bootstrap\ %ghc_check_bootstrap\
%global _hardened_ldflags %{nil}\
-%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/$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 +%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

View File

@ -1,13 +0,0 @@
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")\

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bab7f3b690f7f67f5dffea486583eb9f99f3c83b39bae6ea50867f8744d4a1a1
size 23144

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:73066538e9af8a33e3bc1e280db3fe12423d5e41b0ae70c1abfeef76a6bd6c4a
size 23044

View File

@ -1,3 +1,40 @@
-------------------------------------------------------------------
Thu Aug 27 08:45:19 UTC 2015 - mimi.vx@gmail.com
- update to 1.4.93
- refreshed:
add-group.patch
files-defattr.patch
fix-gen-filelists.patch
fix-library-dir.patch
suse-disable-debug-packages.patch
suse-docdir.patch
- dropped:
version-docdirs.patch
fix-runpath.patch
ldflags.patch
- added:
remove-flags.patch
- fix ghc-pkg path in ghc-deps.sh for ghc-7.10
- local pkgdir macro is redundant
- use utf8 locale for cabal
- add explicit --enable-shared again for arm64
- introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier
- allow overriding ghc- prefix with ghc_name (for ghc784 etc)
- version ghc-pkg in ghc_pkg_recache
- have to turn off hardening in cabal_configure: set _hardened_ldflags to nil
- add cabal_test macro
- only run cabal haddock for real libraries with modules
- make sure basepkg.files is also created for meta packages
- fix the R*PATH regexp
- version ghcpkgdocdir
- add new names ghc_html_dir, ghc_html_libraries_dir, and ghc_html_pkg_dir
- correct cabal-tweak-flag error message for missing flag
- 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
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Aug 19 08:08:54 UTC 2015 - mimi.vx@gmail.com Wed Aug 19 08:08:54 UTC 2015 - mimi.vx@gmail.com

View File

@ -21,7 +21,7 @@
%global without_hscolour 1 %global without_hscolour 1
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 1.4.8 Version: 1.4.93
Release: 0 Release: 0
BuildArch: noarch BuildArch: noarch
Summary: RPM Macros for building packages for GHC Summary: RPM Macros for building packages for GHC
@ -30,6 +30,7 @@ Group: Development/Libraries/Other
Url: https://fedoraproject.org/wiki/Haskell_SIG Url: https://fedoraproject.org/wiki/Haskell_SIG
# source prepared manually from github.com/fedora-haskell/ghc-rpm-macros
Source0: %{name}-%{version}.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 # 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 Patch1: suse-disable-debug-packages.patch
@ -39,17 +40,15 @@ Patch2: add-group.patch
Patch3: files-defattr.patch Patch3: files-defattr.patch
# PATCH-FIX-OPENSUSE suse-docdir.patch peter.trommler@ohm-hochschule.de -- fix location of docdir # PATCH-FIX-OPENSUSE suse-docdir.patch peter.trommler@ohm-hochschule.de -- fix location of docdir
Patch4: suse-docdir.patch Patch4: suse-docdir.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. # PATCH-FIX_UPSTREAM fix-gen-filelists.patch
Patch7: fix-runpath.patch Patch5: fix-gen-filelists.patch
# PATCH-FIX-OPENSUSE ldflags.patch peter.trommler@ohm-hochschule.de -- Remove LDFLAGS. TODO: Find the right openSUSE way to do this. # 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: ldflags.patch Patch8: remove-flags.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). # 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 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
Requires: rpm
BuildRequires: xz BuildRequires: xz
Requires: rpm
%if %{undefined without_hscolour} %if %{undefined without_hscolour}
Requires: hscolour Requires: hscolour
%endif %endif
@ -70,7 +69,6 @@ Requires: %{name} = %{version}-%{release}
Extra macros used for subpackaging of Haskell libraries, Extra macros used for subpackaging of Haskell libraries,
for example in ghc and haskell-platform. for example in ghc and haskell-platform.
%package -n ghc-srpm-macros %package -n ghc-srpm-macros
Summary: RPM macros for building Haskell source packages Summary: RPM macros for building Haskell source packages
Group: Development/Libraries/Other Group: Development/Libraries/Other
@ -82,15 +80,14 @@ BuildArch: noarch
Macros used when generating source Haskell rpm packages. Macros used when generating source Haskell rpm packages.
%prep %prep
%setup -q %setup -q -n %{name}-%{version}
%patch1 -p1 -b .debug %patch1 -p1 -b .debug
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch7 -p1 %patch5 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1
%build %build
echo no build stage needed echo no build stage needed
@ -111,8 +108,8 @@ install -p -D -m 0755 cabal-tweak-flag %{buildroot}/%{_bindir}/cabal-tweak-flag
%dir %{_prefix}/lib/rpm %dir %{_prefix}/lib/rpm
%dir %{_prefix}/lib/rpm/fileattrs %dir %{_prefix}/lib/rpm/fileattrs
%endif %endif
%{_prefix}/lib/rpm/fileattrs/ghc.attr
%{_prefix}/lib/rpm/ghc-deps.sh %{_prefix}/lib/rpm/ghc-deps.sh
%{_prefix}/lib/rpm/fileattrs/ghc.attr
%{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-dep-ver
%{_bindir}/cabal-tweak-flag %{_bindir}/cabal-tweak-flag

View File

@ -1,14 +1,14 @@
Index: ghc-rpm-macros-1.3.91/macros.ghc Index: ghc-rpm-macros-1.4.93/macros.ghc
=================================================================== ===================================================================
--- ghc-rpm-macros-1.3.91.orig/macros.ghc --- ghc-rpm-macros-1.4.93.orig/macros.ghc
+++ ghc-rpm-macros-1.3.91/macros.ghc +++ ghc-rpm-macros-1.4.93/macros.ghc
@@ -24,9 +24,7 @@ fi @@ -26,9 +26,7 @@ fi
# configure
%cabal_configure\ %cabal_configure\
%ghc_check_bootstrap\ %ghc_check_bootstrap\
%global _hardened_ldflags %{nil}\
-CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ -CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
-LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ -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=%{ghc_pkgdocdir} --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 +%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 # install

View File

@ -1,7 +1,8 @@
Index: ghc-rpm-macros-1.3.91/macros.ghc Index: ghc-rpm-macros-1.4.93/macros.ghc
--- ghc-rpm-macros-1.3.91.orig/macros.ghc ===================================================================
+++ ghc-rpm-macros-1.3.91/macros.ghc --- ghc-rpm-macros-1.4.93.orig/macros.ghc
@@ -157,3 +157,13 @@ done\ +++ ghc-rpm-macros-1.4.93/macros.ghc
@@ -186,3 +186,13 @@ done\
%global without_prof 1\ %global without_prof 1\
%global without_haddock 1\ %global without_haddock 1\
%global without_manual 1 %global without_manual 1

View File

@ -1,8 +1,8 @@
Index: ghc-rpm-macros-1.3.91/macros.ghc Index: ghc-rpm-macros-1.4.93/macros.ghc
=================================================================== ===================================================================
--- ghc-rpm-macros-1.3.91.orig/macros.ghc --- ghc-rpm-macros-1.4.93.orig/macros.ghc
+++ ghc-rpm-macros-1.3.91/macros.ghc +++ ghc-rpm-macros-1.4.93/macros.ghc
@@ -18,6 +18,9 @@ proceeding, to avoid dependency ABI brea @@ -19,6 +19,9 @@ proceeding, to avoid dependency ABI brea
%endif\ %endif\
fi fi
@ -12,12 +12,15 @@ Index: ghc-rpm-macros-1.3.91/macros.ghc
# configure # configure
%cabal_configure\ %cabal_configure\
%ghc_check_bootstrap\ %ghc_check_bootstrap\
@@ -29,7 +32,7 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; @@ -40,9 +43,9 @@ tests
%cabal_install %cabal copy --destdir=%{buildroot} -v %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
# root dir for ghc docs # root dir for ghc docs (used by ghc.spec)
-%ghc_html_dir %{_docdir}/ghc/html
+%ghc_html_dir %{_datadir}/doc/ghc/html
# deprecates
-%ghcdocbasedir %{_docdir}/ghc/html -%ghcdocbasedir %{_docdir}/ghc/html
+%ghcdocbasedir %{_datadir}/doc/ghc/html +%ghcdocbasedir %{_datadir}/doc/ghc/html
# libraries doc dir
%ghclibdocdir %{ghcdocbasedir}/libraries # libraries doc dir (internal)
# pkg doc dir %ghc_html_libraries_dir %{ghc_html_dir}/libraries

View File

@ -1,31 +0,0 @@
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}