]> git.pld-linux.org Git - projects/template-specs.git/blame - ghc-package.spec
- doc subpackage
[projects/template-specs.git] / ghc-package.spec
CommitLineData
33f247fc 1%define pkgname NAME
8b1e5bb7
JR
2Summary: -
3Name: ghc-%{pkgname}
4Version: -
33f247fc 5Release: 0.1
8b1e5bb7 6License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
33f247fc
JR
7Group: Development/Languages
8Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9# Source0-md5: -
1239e613 10URL: http://hackage.haskell.org/package/NAME/
4cc44b9e 11BuildRequires: ghc >= 6.12.3
3454a91a 12#BuildRequires: ghc-OTHERMODULE
1239e613 13BuildRequires: rpmbuild(macros) >= 1.608
175c26ee 14%requires_releq ghc
cbca2db5 15#Requires: ghc-OTHERMODULE
33f247fc
JR
16BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
33f247fc
JR
18%description
19
7c9675b4
ER
20%package doc
21Summary: HTML documentation for %{pkgname}
22Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
23Group: Documentation
24
25%description doc
26HTML documentation for %{pkgname}.
27
28%description doc -l pl.UTF-8
29Dokumentacja w formacie HTML dla %{pkgname}.
30
33f247fc
JR
31%prep
32%setup -q -n %{pkgname}-%{version}
33
34%build
b47a07a2 35runhaskell Setup.hs configure -v2 \
33f247fc
JR
36 --prefix=%{_prefix} \
37 --libdir=%{_libdir} \
38 --libexecdir=%{_libexecdir} \
78afb22b 39 --docdir=%{_docdir}/%{name}-%{version}
33f247fc
JR
40
41runhaskell Setup.hs build
d5311ea4 42runhaskell Setup.hs haddock --executables
33f247fc
JR
43
44%install
45rm -rf $RPM_BUILD_ROOT
4cc44b9e
JR
46install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
47
33f247fc
JR
48runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
49
41e08a97 50# work around automatic haddock docs installation
24441f42 51rm -rf %{name}-%{version}-doc
7c9675b4 52cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
41e08a97 53
33f247fc 54runhaskell Setup.hs register \
4cc44b9e 55 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
33f247fc
JR
56
57%clean
58rm -rf $RPM_BUILD_ROOT
59
60%post
1239e613 61%ghc_pkg_recache
33f247fc
JR
62
63%postun
1239e613 64%ghc_pkg_recache
33f247fc
JR
65
66%files
67%defattr(644,root,root,755)
68%doc NEWS
4cc44b9e
JR
69%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
70%{_libdir}/%{ghcdir}/%{pkgname}-%{version}
7c9675b4
ER
71
72%files doc
73%defattr(644,root,root,755)
74%doc %{name}-%{version}-doc/*
This page took 0.116723 seconds and 4 git commands to generate.