osc copypac from project:devel:languages:haskell:ghc-8.6.x package:ghc-rpm-macros revision:2, using keep-link

OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-rpm-macros?expand=0&rev=94
This commit is contained in:
Peter Simons 2019-12-29 02:03:35 +00:00 committed by Git OBS Bridge
parent 3b4893878c
commit f04549ec8c
5 changed files with 45 additions and 15 deletions

View File

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

View File

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

View File

@ -1,11 +1,3 @@
-------------------------------------------------------------------
Fri Dec 20 07:44:37 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
- update to 1.9.90
* backport upstream changes
* workaround for packages without Setup.hs file
- drop no-selfbootstrap-check.patch
-------------------------------------------------------------------
Wed Jul 18 14:26:39 UTC 2018 - psimons@suse.com

View File

@ -19,7 +19,7 @@
%global macros_dir %{_sysconfdir}/rpm
%global without_hscolour 1
Name: ghc-rpm-macros
Version: 1.9.90
Version: 1.7.4
Release: 0
Summary: RPM Macros for building packages for GHC
License: GPL-3.0-or-later
@ -27,8 +27,10 @@ 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
BuildArch: noarch
%if %{undefined without_hscolour}
Requires: hscolour
@ -58,6 +60,7 @@ Macros used when generating source Haskell rpm packages.
%prep
%setup -q
%patch -p1
%build
echo no build stage needed
@ -73,7 +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
install -p -D -m 0644 Setup.hs %{buildroot}/%{_datadir}/%{name}/Setup.hs
%if 0%{?suse_version} <= 1320
install -d -D -m 0755 %{buildroot}%{_datadir}/licenses
%endif
%files
%doc AUTHORS
@ -87,8 +92,11 @@ install -p -D -m 0644 Setup.hs %{buildroot}/%{_datadir}/%{name}/Setup.hs
%{_prefix}/lib/rpm/ghc-pkg-wrapper
%{_prefix}/lib/rpm/fileattrs/ghc.attr
%{_prefix}/lib/rpm/ghc-dirs.sh
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/Setup.hs
# 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

View File

@ -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