diff --git a/ghc-rpm-macros.changes b/ghc-rpm-macros.changes index 95d0455..b8e6b00 100644 --- a/ghc-rpm-macros.changes +++ b/ghc-rpm-macros.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sun May 27 17:22:21 UTC 2018 - ptrommler@icloud.com + +- own license directory on older openSUSE + +------------------------------------------------------------------- +Fri May 4 06:59:22 UTC 2018 - ptrommler@icloud.com + +- add no-selfbootstrap-check.patch +* GHC's ABI is stable now so a selfbootstrapped compiler is + no longer needed + ------------------------------------------------------------------- Wed Apr 18 07:43:30 UTC 2018 - mimi.vx@gmail.com diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 039f149..7d6c623 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -27,6 +27,7 @@ Group: Development/Libraries/Other Url: https://fedoraproject.org/wiki/Haskell_SIG # source gets updated with osc service dr Source0: %{name}-%{version}.tar.xz +Patch: no-selfbootstrap-check.patch BuildRequires: xz Requires: rpm BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -59,6 +60,7 @@ Macros used when generating source Haskell rpm packages. %prep %setup -q +%patch -p1 %build echo no build stage needed @@ -74,6 +76,9 @@ install -p -D -m 0755 cabal-tweak-flag %{buildroot}/%{_bindir}/cabal-tweak-flag install -p -D -m 0755 ghc-pkg-wrapper %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper install -p -D -m 0644 ghc.attr %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr install -p -D -m 0755 ghc-dirs.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-dirs.sh +%if 0%{?suse_version} <= 1320 +install -d -D -m 0755 %{buildroot}%{_datadir}/licenses +%endif %files %doc AUTHORS @@ -87,6 +92,11 @@ install -p -D -m 0755 ghc-dirs.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-dirs.sh %{_prefix}/lib/rpm/ghc-pkg-wrapper %{_prefix}/lib/rpm/fileattrs/ghc.attr %{_prefix}/lib/rpm/ghc-dirs.sh +# With 1.7.4 of ghc-rpm-macros license files are installed here +# but rpm does not own this directory on older openSUSE. +%if 0%{?suse_version} <= 1320 +%dir %{_datadir}/licenses +%endif %files extra %config %{macros_dir}/macros.ghc-extra diff --git a/no-selfbootstrap-check.patch b/no-selfbootstrap-check.patch new file mode 100644 index 0000000..f97d967 --- /dev/null +++ b/no-selfbootstrap-check.patch @@ -0,0 +1,30 @@ +Index: ghc-rpm-macros-1.7.4/macros.ghc +=================================================================== +--- ghc-rpm-macros-1.7.4.orig/macros.ghc ++++ ghc-rpm-macros-1.7.4/macros.ghc +@@ -9,25 +9,11 @@ LANG=en_US.utf8\ + # compiler version + %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} + +-# check ghc version was rebuilt against self +-%ghc_check_bootstrap\ +-if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\ +- echo "Warning: this ghc build is not self-bootstrapped."\ +-%if %{undefined ghc_bootstrapping}\ +- echo "The ghc package should be rebuilt against its current version before\ +-proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\ +- echo "To override set ghc_bootstrapping."\ +- echo "Aborting."\ +- exit 1\ +-%endif\ +-fi +- + # no _pkgdocdir in openSUSE + %_pkgdocdir %{_docdir}/%{name} + + # configure + %cabal_configure\ +-%ghc_check_bootstrap\ + %global _hardened_ldflags %{nil}\ + %cabal --version\ + %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options