]> git.pld-linux.org Git - packages/ghc-base-noprelude.git/blob - ghc-base-noprelude.spec
- new
[packages/ghc-base-noprelude.git] / ghc-base-noprelude.spec
1 %define         pkgname base-noprelude
2 Summary:        "base" package sans "Prelude" module
3 Name:           ghc-%{pkgname}
4 Version:        4.13.0.0
5 Release:        1
6 License:        BSD
7 Group:          Development/Languages
8 #Source0Download: http://hackage.haskell.org/package/base-noprelude
9 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
10 # Source0-md5:  954eb0034aa3d09b7bca3de732ba8078
11 Patch0:         ghc-8.10.patch
12 URL:            http://hackage.haskell.org/package/base-noprelude
13 BuildRequires:  ghc >= 6.12.3
14 BuildRequires:  rpmbuild(macros) >= 1.608
15 %requires_eq    ghc
16 Requires(post,postun):  /usr/bin/ghc-pkg
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 # debuginfo is not useful for ghc
20 %define         _enable_debug_packages  0
21
22 # don't compress haddock files
23 %define         _noautocompressdoc      *.haddock
24
25 %description
26 This package simplifies defining custom Preludes without having to use
27 -XNoImplicitPrelude by re-exporting the full module-hierarchy of the
28 base-4.13.0.0 package except for the Prelude module.
29
30 An usage example for such a Prelude-replacement is available with the
31 Prelude package.
32
33 %prep
34 %setup -q -n %{pkgname}-%{version}
35 %patch0 -p1
36
37 cat >Setup.lhs<<'EOF'
38 #!/usr/bin/env runhaskell
39 > import Distribution.Simple
40 > main = defaultMain
41 EOF
42
43 %build
44 runhaskell Setup.lhs configure -v2 \
45         --prefix=%{_prefix} \
46         --libdir=%{_libdir} \
47         --libexecdir=%{_libexecdir} \
48         --docdir=%{_docdir}/%{name}-%{version}
49
50 runhaskell Setup.lhs build
51 runhaskell Setup.lhs haddock --executables
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
56
57 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
58
59 # work around automatic haddock docs installation
60 %{__rm} -rf %{name}-%{version}-doc
61 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
62 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
63
64 runhaskell Setup.lhs register \
65         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 %ghc_pkg_recache
72
73 %postun
74 %ghc_pkg_recache
75
76 %files
77 %defattr(644,root,root,755)
78 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
This page took 0.080156 seconds and 3 git commands to generate.