]>
Commit | Line | Data |
---|---|---|
916c4eba | 1 | %define pkgname utf8-string |
7ed0ca22 JR |
2 | Summary: Support for reading and writing UTF8 Strings |
3 | Name: ghc-%{pkgname} | |
f624d792 | 4 | Version: 0.3.7 |
7b98549e | 5 | Release: 3 |
7ed0ca22 JR |
6 | License: BSD |
7 | Group: Development/Languages | |
8 | Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz | |
6eca526c | 9 | # Source0-md5: 50e5c395713e716e0e4a56da73f87ccd |
916c4eba | 10 | URL: http://hackage.haskell.org/package/utf8-string/ |
431dcf85 | 11 | BuildRequires: ghc >= 6.12.3 |
8d020ae0 | 12 | BuildRequires: rpmbuild(macros) >= 1.608 |
b65391b4 | 13 | %requires_eq ghc |
7ed0ca22 JR |
14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
15 | ||
b65391b4 ER |
16 | # debuginfo is not useful for ghc |
17 | %define _enable_debug_packages 0 | |
18 | ||
7ed0ca22 | 19 | %description |
8d020ae0 ER |
20 | A UTF8 layer for IO and Strings. The utf8-string package provides |
21 | operations for encoding UTF8 strings to Word8 lists and back, and for | |
22 | reading and writing UTF8 without truncation. | |
7ed0ca22 | 23 | |
b65391b4 ER |
24 | %package doc |
25 | Summary: HTML documentation for %{pkgname} | |
26 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
27 | Group: Documentation | |
28 | ||
29 | %description doc | |
30 | HTML documentation for %{pkgname}. | |
31 | ||
32 | %description doc -l pl.UTF-8 | |
33 | Dokumentacja w formacie HTML dla %{pkgname}. | |
34 | ||
7ed0ca22 JR |
35 | %prep |
36 | %setup -q -n %{pkgname}-%{version} | |
37 | ||
38 | %build | |
0ce6d237 | 39 | runhaskell Setup.lhs configure -v2 \ |
7ed0ca22 JR |
40 | --prefix=%{_prefix} \ |
41 | --libdir=%{_libdir} \ | |
42 | --libexecdir=%{_libexecdir} \ | |
7ed0ca22 JR |
43 | --docdir=%{_docdir}/%{name}-%{version} |
44 | ||
0ce6d237 JR |
45 | runhaskell Setup.lhs build |
46 | runhaskell Setup.lhs haddock --executables | |
7ed0ca22 JR |
47 | |
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
431dcf85 JR |
50 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d |
51 | ||
0ce6d237 | 52 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT |
7ed0ca22 JR |
53 | |
54 | # work around automatic haddock docs installation | |
7b98549e | 55 | %{__rm} -rf %{name}-%{version}-doc |
b65391b4 | 56 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc |
ce9f6694 | 57 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
7ed0ca22 | 58 | |
0ce6d237 | 59 | runhaskell Setup.lhs register \ |
431dcf85 | 60 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
7ed0ca22 JR |
61 | |
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %post | |
916c4eba | 66 | %ghc_pkg_recache |
7ed0ca22 JR |
67 | |
68 | %postun | |
916c4eba | 69 | %ghc_pkg_recache |
7ed0ca22 JR |
70 | |
71 | %files | |
72 | %defattr(644,root,root,755) | |
431dcf85 JR |
73 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
74 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
b65391b4 ER |
75 | |
76 | %files doc | |
77 | %defattr(644,root,root,755) | |
78 | %doc %{name}-%{version}-doc/* |