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