1 %define pkgname utf8-string
2 Summary: Support for reading and writing UTF8 Strings
7 Group: Development/Languages
8 Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5: 50e5c395713e716e0e4a56da73f87ccd
10 URL: http://hackage.haskell.org/package/utf8-string/
11 BuildRequires: ghc >= 6.12.3
12 BuildRequires: rpmbuild(macros) >= 1.608
14 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16 # debuginfo is not useful for ghc
17 %define _enable_debug_packages 0
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.
25 Summary: HTML documentation for %{pkgname}
26 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
30 HTML documentation for %{pkgname}.
32 %description doc -l pl.UTF-8
33 Dokumentacja w formacie HTML dla %{pkgname}.
36 %setup -q -n %{pkgname}-%{version}
39 runhaskell Setup.lhs configure -v2 \
42 --libexecdir=%{_libexecdir} \
43 --docdir=%{_docdir}/%{name}-%{version}
45 runhaskell Setup.lhs build
46 runhaskell Setup.lhs haddock --executables
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
52 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
54 # work around automatic haddock docs installation
55 %{__rm} -rf %{name}-%{version}-doc
56 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
57 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
59 runhaskell Setup.lhs register \
60 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
63 rm -rf $RPM_BUILD_ROOT
72 %defattr(644,root,root,755)
73 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
74 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
77 %defattr(644,root,root,755)
78 %doc %{name}-%{version}-doc/*