]> git.pld-linux.org Git - packages/ghc-text.git/blob - ghc-text.spec
e431947f1b317ac27d18393467a4ea215230438a
[packages/ghc-text.git] / ghc-text.spec
1 %define         pkgname text
2 Summary:        A Haskell binding to the text graphics library
3 Name:           ghc-%{pkgname}
4 Version:        0.11.2.3
5 Release:        0.1
6 License:        BSD
7 Group:          Development/Languages
8 Source0:        http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5:  7a469d49a7576fb3a18785cb64d4ee6c
10 URL:            http://hackage.haskell.org/package/text/
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 Haskell binding to the text graphics library.
21
22 %package doc
23 Summary:        HTML documentation for %{pkgname}
24 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla %{pkgname}
25 Group:          Documentation
26
27 %description doc
28 HTML documentation for %{pkgname}.
29
30 %description doc -l pl.UTF-8
31 Dokumentacja w formacie HTML dla %{pkgname}.
32
33 %prep
34 %setup -q -n %{pkgname}-%{version}
35
36 %build
37 runhaskell Setup.lhs configure -v2 \
38         --prefix=%{_prefix} \
39         --libdir=%{_libdir} \
40         --libexecdir=%{_libexecdir} \
41         --docdir=%{_docdir}/%{name}-%{version}
42
43 runhaskell Setup.lhs build
44 runhaskell Setup.lhs haddock --executables
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
49
50 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
51
52 # work around automatic haddock docs installation
53 rm -rf %{name}-%{version}-doc
54 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
55 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
56
57 runhaskell Setup.lhs register \
58         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %post
64 %ghc_pkg_recache
65
66 %postun
67 %ghc_pkg_recache
68
69 %files
70 %defattr(644,root,root,755)
71 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
72 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
73
74 %files doc
75 %defattr(644,root,root,755)
76 %doc %{name}-%{version}-doc/*
This page took 0.084389 seconds and 2 git commands to generate.