]>
Commit | Line | Data |
---|---|---|
fa710fca JR |
1 | %define pkgname pango |
2 | Summary: Binding to the Pango text rendering engine | |
3 | Name: ghc-%{pkgname} | |
4 | Version: 0.12.3 | |
5 | Release: 0.1 | |
6 | License: LGPL v2.1 | |
7 | Group: Development/Languages | |
8 | Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz | |
9 | # Source0-md5: 1ef3132cb569703d5b1bc262c9d86fe3 | |
10 | URL: http://hackage.haskell.org/package/pango/ | |
11 | BuildRequires: ghc >= 6.12.3 | |
12 | BuildRequires: ghc-prof | |
13 | BuildRequires: ghc-glib | |
14 | BuildRequires: ghc-cairo | |
15 | BuildRequires: gtk2hs | |
16 | BuildRequires: rpmbuild(macros) >= 1.608 | |
69053748 | 17 | %requires_eq ghc |
fa710fca JR |
18 | Requires(post,postun): /usr/bin/ghc-pkg |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | # debuginfo is not useful for ghc | |
22 | %define _enable_debug_packages 0 | |
23 | ||
24 | # don't compress haddoc files | |
25 | %define _noautocompressdoc *.haddock | |
26 | ||
27 | %description | |
28 | This package provides a wrapper around the Pango C library that allows | |
29 | high-quality rendering of Unicode text. It can be used either with | |
30 | Cairo to output text in PDF, PS or other documents or with Gtk+ to | |
31 | display text on-screen. | |
32 | ||
33 | %package prof | |
34 | Summary: Profiling %{pkgname} library for GHC | |
35 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
36 | Group: Development/Libraries | |
37 | Requires: %{name} = %{version}-%{release} | |
38 | ||
39 | %description prof | |
40 | Profiling %{pkgname} library for GHC. Should be installed when | |
41 | GHC's profiling subsystem is needed. | |
42 | ||
43 | %description prof -l pl.UTF-8 | |
44 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
45 | kiedy potrzebujemy systemu profilującego z GHC. | |
46 | ||
47 | %prep | |
48 | %setup -q -n %{pkgname}-%{version} | |
49 | ||
50 | %build | |
51 | runhaskell Setup.hs configure -v2 --enable-library-profiling \ | |
52 | --prefix=%{_prefix} \ | |
53 | --libdir=%{_libdir} \ | |
54 | --libexecdir=%{_libexecdir} \ | |
55 | --docdir=%{_docdir}/%{name}-%{version} | |
56 | ||
57 | runhaskell Setup.hs build | |
58 | runhaskell Setup.hs haddock --executables | |
59 | ||
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
63 | ||
64 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
65 | ||
66 | # work around automatic haddock docs installation | |
67 | rm -rf %{name}-%{version}-doc | |
68 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
69 | ||
70 | runhaskell Setup.hs register \ | |
71 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
72 | ||
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %post | |
77 | %ghc_pkg_recache | |
78 | ||
79 | %postun | |
80 | %ghc_pkg_recache | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
84 | %doc NEWS | |
85 | %doc %{name}-%{version}-doc/* | |
86 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
87 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
88 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o | |
89 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a | |
90 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
91 | ||
92 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE | |
93 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.hi | |
94 | ||
95 | %files prof | |
96 | %defattr(644,root,root,755) | |
97 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
98 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.p_hi |