[packages/ghc-base-noprelude] - new
baggins
baggins at pld-linux.org
Sat May 30 11:50:46 CEST 2020
commit 22248768662a2af047e92249173f033c740ff68a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat May 30 11:50:23 2020 +0200
- new
ghc-8.10.patch | 11 +++++++
ghc-base-noprelude.spec | 78 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+)
---
diff --git a/ghc-base-noprelude.spec b/ghc-base-noprelude.spec
new file mode 100644
index 0000000..eba3454
--- /dev/null
+++ b/ghc-base-noprelude.spec
@@ -0,0 +1,78 @@
+%define pkgname base-noprelude
+Summary: "base" package sans "Prelude" module
+Name: ghc-%{pkgname}
+Version: 4.13.0.0
+Release: 1
+License: BSD
+Group: Development/Languages
+#Source0Download: http://hackage.haskell.org/package/base-noprelude
+Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5: 954eb0034aa3d09b7bca3de732ba8078
+Patch0: ghc-8.10.patch
+URL: http://hackage.haskell.org/package/base-noprelude
+BuildRequires: ghc >= 6.12.3
+BuildRequires: rpmbuild(macros) >= 1.608
+%requires_eq ghc
+Requires(post,postun): /usr/bin/ghc-pkg
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# debuginfo is not useful for ghc
+%define _enable_debug_packages 0
+
+# don't compress haddock files
+%define _noautocompressdoc *.haddock
+
+%description
+This package simplifies defining custom Preludes without having to use
+-XNoImplicitPrelude by re-exporting the full module-hierarchy of the
+base-4.13.0.0 package except for the Prelude module.
+
+An usage example for such a Prelude-replacement is available with the
+Prelude package.
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+%patch0 -p1
+
+cat >Setup.lhs<<'EOF'
+#!/usr/bin/env runhaskell
+> import Distribution.Simple
+> main = defaultMain
+EOF
+
+%build
+runhaskell Setup.lhs configure -v2 \
+ --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --libexecdir=%{_libexecdir} \
+ --docdir=%{_docdir}/%{name}-%{version}
+
+runhaskell Setup.lhs build
+runhaskell Setup.lhs haddock --executables
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
+
+runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
+
+# work around automatic haddock docs installation
+%{__rm} -rf %{name}-%{version}-doc
+cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+
+runhaskell Setup.lhs register \
+ --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%ghc_pkg_recache
+
+%postun
+%ghc_pkg_recache
+
+%files
+%defattr(644,root,root,755)
+%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
diff --git a/ghc-8.10.patch b/ghc-8.10.patch
new file mode 100644
index 0000000..bf4c6ea
--- /dev/null
+++ b/ghc-8.10.patch
@@ -0,0 +1,11 @@
+--- base-noprelude-4.13.0.0/base-noprelude.cabal~ 2001-09-09 03:46:40.000000000 +0200
++++ base-noprelude-4.13.0.0/base-noprelude.cabal 2020-05-30 11:48:29.721965329 +0200
+@@ -34,7 +34,7 @@
+ location: https://github.com/hvr/base-noprelude.git
+
+ library
+- build-depends: base ==4.13.0.0
++ build-depends: base
+ default-language: Haskell2010
+
+ -- re-exported modules copied from base-4.13.0.0's exposed-modules
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ghc-base-noprelude.git/commitdiff/22248768662a2af047e92249173f033c740ff68a
More information about the pld-cvs-commit
mailing list