]>
Commit | Line | Data |
---|---|---|
c21b0a6d | 1 | %define pkgname PACKAGE_NAME |
8b1e5bb7 JR |
2 | Summary: - |
3 | Name: ghc-%{pkgname} | |
4 | Version: - | |
33f247fc | 5 | Release: 0.1 |
8b1e5bb7 | 6 | License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here) |
33f247fc JR |
7 | Group: Development/Languages |
8 | Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz | |
9 | # Source0-md5: - | |
c21b0a6d | 10 | URL: http://hackage.haskell.org/package/PACKAGE_NAME/ |
4cc44b9e | 11 | BuildRequires: ghc >= 6.12.3 |
e6e67c39 | 12 | #BuildRequires: ghc-prof |
3454a91a | 13 | #BuildRequires: ghc-OTHERMODULE |
1239e613 | 14 | BuildRequires: rpmbuild(macros) >= 1.608 |
175c26ee | 15 | %requires_releq ghc |
3ea9522f | 16 | Requires(post,postun): /usr/bin/ghc-pkg |
cbca2db5 | 17 | #Requires: ghc-OTHERMODULE |
33f247fc JR |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
da37dde1 ER |
20 | # debuginfo is not useful for ghc |
21 | %define _enable_debug_packages 0 | |
22 | ||
d2d5700e JR |
23 | # don't compress haddoc files |
24 | %define _noautocompressdoc *.haddock | |
25 | ||
33f247fc JR |
26 | %description |
27 | ||
bcbb32c6 JR |
28 | %package prof |
29 | Summary: Profiling %{pkgname} library for GHC | |
30 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
31 | Group: Development/Libraries | |
32 | Requires: %{name} = %{version}-%{release} | |
33 | ||
34 | %description prof | |
35 | Profiling %{pkgname} library for GHC. Should be installed when | |
36 | GHC's profiling subsystem is needed. | |
37 | ||
38 | %description prof -l pl.UTF-8 | |
39 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
40 | kiedy potrzebujemy systemu profilującego z GHC. | |
41 | ||
33f247fc JR |
42 | %prep |
43 | %setup -q -n %{pkgname}-%{version} | |
44 | ||
45 | %build | |
e6e67c39 | 46 | runhaskell Setup.lhs configure -v2 --enable-library-profiling \ |
33f247fc JR |
47 | --prefix=%{_prefix} \ |
48 | --libdir=%{_libdir} \ | |
49 | --libexecdir=%{_libexecdir} \ | |
78afb22b | 50 | --docdir=%{_docdir}/%{name}-%{version} |
33f247fc | 51 | |
e6e67c39 JR |
52 | runhaskell Setup.lhs build |
53 | runhaskell Setup.lhs haddock --executables | |
33f247fc JR |
54 | |
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
4cc44b9e JR |
57 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d |
58 | ||
e6e67c39 | 59 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT |
33f247fc | 60 | |
41e08a97 | 61 | # work around automatic haddock docs installation |
e9a2fb6c | 62 | %{__rm} -rf %{name}-%{version}-doc |
d2d5700e | 63 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc |
e9a2fb6c | 64 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
41e08a97 | 65 | |
e6e67c39 | 66 | runhaskell Setup.lhs register \ |
4cc44b9e | 67 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
33f247fc JR |
68 | |
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %post | |
1239e613 | 73 | %ghc_pkg_recache |
33f247fc JR |
74 | |
75 | %postun | |
1239e613 | 76 | %ghc_pkg_recache |
33f247fc JR |
77 | |
78 | %files | |
79 | %defattr(644,root,root,755) | |
80 | %doc NEWS | |
d2d5700e | 81 | %doc %{name}-%{version}-doc/* |
4cc44b9e | 82 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
bcbb32c6 JR |
83 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |
84 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o | |
85 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a | |
86 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
87 | ||
88 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE | |
89 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.hi | |
90 | ||
91 | %files prof | |
92 | %defattr(644,root,root,755) | |
93 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
94 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.p_hi |