]> git.pld-linux.org Git - projects/template-specs.git/blame - ghc-package.spec
- post* scriptlets require /usr/bin/ghc-pkg
[projects/template-specs.git] / ghc-package.spec
CommitLineData
c21b0a6d 1%define pkgname PACKAGE_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: -
c21b0a6d 10URL: http://hackage.haskell.org/package/PACKAGE_NAME/
4cc44b9e 11BuildRequires: ghc >= 6.12.3
3454a91a 12#BuildRequires: ghc-OTHERMODULE
1239e613 13BuildRequires: rpmbuild(macros) >= 1.608
175c26ee 14%requires_releq ghc
3ea9522f 15Requires(post,postun): /usr/bin/ghc-pkg
cbca2db5 16#Requires: ghc-OTHERMODULE
33f247fc
JR
17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
da37dde1
ER
19# debuginfo is not useful for ghc
20%define _enable_debug_packages 0
21
d2d5700e
JR
22# don't compress haddoc files
23%define _noautocompressdoc *.haddock
24
33f247fc
JR
25%description
26
bcbb32c6
JR
27%package prof
28Summary: Profiling %{pkgname} library for GHC
29Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
30Group: Development/Libraries
31Requires: %{name} = %{version}-%{release}
32
33%description prof
34Profiling %{pkgname} library for GHC. Should be installed when
35GHC's profiling subsystem is needed.
36
37%description prof -l pl.UTF-8
38Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
39kiedy potrzebujemy systemu profilującego z GHC.
40
33f247fc
JR
41%prep
42%setup -q -n %{pkgname}-%{version}
43
44%build
bcbb32c6 45runhaskell Setup.hs configure -v2 --enable-library-profiling \
33f247fc
JR
46 --prefix=%{_prefix} \
47 --libdir=%{_libdir} \
48 --libexecdir=%{_libexecdir} \
78afb22b 49 --docdir=%{_docdir}/%{name}-%{version}
33f247fc
JR
50
51runhaskell Setup.hs build
d5311ea4 52runhaskell Setup.hs haddock --executables
33f247fc
JR
53
54%install
55rm -rf $RPM_BUILD_ROOT
4cc44b9e
JR
56install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
57
33f247fc
JR
58runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
59
41e08a97 60# work around automatic haddock docs installation
24441f42 61rm -rf %{name}-%{version}-doc
d2d5700e 62cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
41e08a97 63
33f247fc 64runhaskell Setup.hs register \
4cc44b9e 65 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
33f247fc
JR
66
67%clean
68rm -rf $RPM_BUILD_ROOT
69
70%post
1239e613 71%ghc_pkg_recache
33f247fc
JR
72
73%postun
1239e613 74%ghc_pkg_recache
33f247fc
JR
75
76%files
77%defattr(644,root,root,755)
78%doc NEWS
d2d5700e 79%doc %{name}-%{version}-doc/*
4cc44b9e 80%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
bcbb32c6
JR
81%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
82%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
83%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
84%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
85
86%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE
87%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.hi
88
89%files prof
90%defattr(644,root,root,755)
91%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
92%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.p_hi
This page took 0.305381 seconds and 4 git commands to generate.