]> git.pld-linux.org Git - packages/ghc-utf8-string.git/blob - ghc-utf8-string.spec
- rel 2, rebuild with ghc 8.10.1
[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:        1.0.1.1
5 Release:        2
6 License:        BSD
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
14 %requires_eq    ghc
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 # debuginfo is not useful for ghc
18 %define         _enable_debug_packages  0
19
20 %description
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.
24
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
36 %prep
37 %setup -q -n %{pkgname}-%{version}
38 %patch0 -p1
39
40 %build
41 runhaskell Setup.lhs configure -v2 \
42         --prefix=%{_prefix} \
43         --libdir=%{_libdir} \
44         --libexecdir=%{_libexecdir} \
45         --docdir=%{_docdir}/%{name}-%{version}
46
47 runhaskell Setup.lhs build
48 runhaskell Setup.lhs haddock --executables
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
53
54 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
55
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}
60
61 runhaskell Setup.lhs register \
62         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post
68 %ghc_pkg_recache
69
70 %postun
71 %ghc_pkg_recache
72
73 %files
74 %defattr(644,root,root,755)
75 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
76 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
77
78 %files doc
79 %defattr(644,root,root,755)
80 %doc %{name}-%{version}-doc/*
This page took 0.117134 seconds and 3 git commands to generate.