]> git.pld-linux.org Git - packages/ghc-cairo.git/blob - ghc-cairo.spec
ad4bebe0b870412faca62b2ef5e2595d7e8c0e25
[packages/ghc-cairo.git] / ghc-cairo.spec
1 %define         pkgname cairo
2 Summary:        Binding to the Cairo library
3 Name:           ghc-%{pkgname}
4 Version:        0.12.3.1
5 Release:        0.1
6 License:        BSD3
7 Group:          Development/Languages
8 Source0:        http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5:  9d489fbb6cadb3d109543fe25c50195e
10 URL:            http://hackage.haskell.org/package/cairo/
11 BuildRequires:  ghc >= 6.12.3
12 BuildRequires:  ghc-prof
13 BuildRequires:  gtk2hs
14 BuildRequires:  rpmbuild(macros) >= 1.608
15 %requires_releq ghc
16 Requires(post,postun):  /usr/bin/ghc-pkg
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 # debuginfo is not useful for ghc
20 %define         _enable_debug_packages  0
21
22 # don't compress haddoc files
23 %define         _noautocompressdoc      *.haddock
24
25 %description
26 Cairo is a library to render high quality vector graphics.
27 There exist various backends that allows rendering to Gtk windows,
28 PDF, PS, PNG and SVG documents, amongst others.
29
30 %package prof
31 Summary:        Profiling %{pkgname} library for GHC
32 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC.
33 Group:          Development/Libraries
34 Requires:       %{name} = %{version}-%{release}
35
36 %description prof
37 Profiling %{pkgname} library for GHC.  Should be installed when
38 GHC's profiling subsystem is needed.
39
40 %description prof -l pl.UTF-8
41 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
42 kiedy potrzebujemy systemu profilującego z GHC.
43
44 %prep
45 %setup -q -n %{pkgname}-%{version}
46
47 %build
48 runhaskell Setup.hs configure -v2 --enable-library-profiling \
49         --prefix=%{_prefix} \
50         --libdir=%{_libdir} \
51         --libexecdir=%{_libexecdir} \
52         --docdir=%{_docdir}/%{name}-%{version}
53
54 runhaskell Setup.hs build
55 runhaskell Setup.hs haddock --executables
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
60
61 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
62
63 # work around automatic haddock docs installation
64 rm -rf %{name}-%{version}-doc
65 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
66
67 runhaskell Setup.hs register \
68         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %post
74 %ghc_pkg_recache
75
76 %postun
77 %ghc_pkg_recache
78
79 %files
80 %defattr(644,root,root,755)
81 %doc NEWS
82 %doc %{name}-%{version}-doc/*
83 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
84 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
85 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
86 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
87 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
88
89 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE
90 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.hi
91
92 %files prof
93 %defattr(644,root,root,755)
94 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
95 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.p_hi
This page took 0.075549 seconds and 2 git commands to generate.