]> git.pld-linux.org Git - packages/ghc-utf8-string.git/blob - ghc-utf8-string.spec
cb4e25cb260254a1d1b15c715d54f6a4f8a34e74
[packages/ghc-utf8-string.git] / ghc-utf8-string.spec
1 %define         pkgname utf8-string
2 Summary:        Support for reading and writing UTF8 Strings
3 Name:           ghc-%{pkgname}
4 Version:        0.3.7
5 Release:        3
6 License:        BSD
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
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 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.
23
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
35 %prep
36 %setup -q -n %{pkgname}-%{version}
37
38 %build
39 runhaskell Setup.lhs configure -v2 \
40         --prefix=%{_prefix} \
41         --libdir=%{_libdir} \
42         --libexecdir=%{_libexecdir} \
43         --docdir=%{_docdir}/%{name}-%{version}
44
45 runhaskell Setup.lhs build
46 runhaskell Setup.lhs haddock --executables
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
51
52 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
53
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}
58
59 runhaskell Setup.lhs register \
60         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 %ghc_pkg_recache
67
68 %postun
69 %ghc_pkg_recache
70
71 %files
72 %defattr(644,root,root,755)
73 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
74 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
75
76 %files doc
77 %defattr(644,root,root,755)
78 %doc %{name}-%{version}-doc/*
This page took 0.067213 seconds and 2 git commands to generate.