]>
Commit | Line | Data |
---|---|---|
ca6e51f5 JP |
1 | %define pkgname timezone-series |
2 | Summary: A Haskell binding to the timezone-series graphics library | |
3 | Name: ghc-%{pkgname} | |
a6623436 | 4 | Version: 0.1.9 |
aff5c50f | 5 | Release: 2 |
ca6e51f5 JP |
6 | License: BSD |
7 | Group: Development/Languages | |
8 | Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz | |
a6623436 | 9 | # Source0-md5: e2ffcf874ed7043bc73f406cf53c22cf |
ca6e51f5 JP |
10 | URL: http://hackage.haskell.org/package/timezone-series/ |
11 | BuildRequires: ghc >= 6.12.3 | |
12 | BuildRequires: rpmbuild(macros) >= 1.608 | |
13 | %requires_eq ghc | |
14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
15 | ||
16 | # debuginfo is not useful for ghc | |
17 | %define _enable_debug_packages 0 | |
18 | ||
19 | %description | |
20 | A Haskell binding to the timezone-series graphics library. | |
21 | ||
22 | %package doc | |
23 | Summary: HTML documentation for %{pkgname} | |
24 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
25 | Group: Documentation | |
26 | ||
27 | %description doc | |
28 | HTML documentation for %{pkgname}. | |
29 | ||
30 | %description doc -l pl.UTF-8 | |
31 | Dokumentacja w formacie HTML dla %{pkgname}. | |
32 | ||
33 | %prep | |
34 | %setup -q -n %{pkgname}-%{version} | |
35 | ||
36 | %build | |
37 | runhaskell Setup.hs configure -v2 \ | |
38 | --prefix=%{_prefix} \ | |
39 | --libdir=%{_libdir} \ | |
40 | --libexecdir=%{_libexecdir} \ | |
41 | --docdir=%{_docdir}/%{name}-%{version} | |
42 | ||
43 | runhaskell Setup.hs build | |
44 | runhaskell Setup.hs haddock --executables | |
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
49 | ||
50 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
51 | ||
52 | # work around automatic haddock docs installation | |
53 | rm -rf %{name}-%{version}-doc | |
54 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc | |
55 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
56 | ||
57 | runhaskell Setup.hs register \ | |
58 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
59 | ||
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %post | |
64 | %ghc_pkg_recache | |
65 | ||
66 | %postun | |
67 | %ghc_pkg_recache | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
72 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
73 | ||
74 | %files doc | |
75 | %defattr(644,root,root,755) | |
76 | %doc %{name}-%{version}-doc/* |