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: fe24e26bd4b09731af66ef27b18b5177
10 Patch0: base-dep.patch
11 URL: http://hackage.haskell.org/package/utf8-string/
12 BuildRequires: ghc >= 6.12.3
13 BuildRequires: rpmbuild(macros) >= 1.608
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 # debuginfo is not useful for ghc
18 %define _enable_debug_packages 0
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.
26 Summary: HTML documentation for %{pkgname}
27 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
31 HTML documentation for %{pkgname}.
33 %description doc -l pl.UTF-8
34 Dokumentacja w formacie HTML dla %{pkgname}.
37 %setup -q -n %{pkgname}-%{version}
41 runhaskell Setup.lhs configure -v2 \
44 --libexecdir=%{_libexecdir} \
45 --docdir=%{_docdir}/%{name}-%{version}
47 runhaskell Setup.lhs build
48 runhaskell Setup.lhs haddock --executables
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
54 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
56 # work around automatic haddock docs installation
57 %{__rm} -rf %{name}-%{version}-doc
58 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
59 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
61 runhaskell Setup.lhs register \
62 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
65 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
75 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
76 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
79 %defattr(644,root,root,755)
80 %doc %{name}-%{version}-doc/*