]> git.pld-linux.org Git - packages/ghc-glib.git/blob - ghc-glib.spec
c399a460d9ca3493af991b42ab26be19a8fd8fe2
[packages/ghc-glib.git] / ghc-glib.spec
1 %define         pkgname glib
2 Summary:        Binding to the GLIB library for Gtk2Hs
3 Name:           ghc-%{pkgname}
4 Version:        0.12.3.1
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:  f2899bd2a2850fe95479ddb63490eb04
10 URL:            http://hackage.haskell.org/package/glib/
11 BuildRequires:  ghc >= 6.12.3
12 BuildRequires:  ghc-prof
13 BuildRequires:  glib2-devel
14 BuildRequires:  gtk2hs
15 BuildRequires:  rpmbuild(macros) >= 1.608
16 %requires_releq ghc
17 Requires(post,postun):  /usr/bin/ghc-pkg
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 # debuginfo is not useful for ghc
21 %define         _enable_debug_packages  0
22
23 # don't compress haddoc files
24 %define         _noautocompressdoc      *.haddock
25
26 %description
27 The GNU Library is a collection of C data structures and utility
28 function for dealing with Unicode. This package only binds as much
29 functionality as required to support the packages that wrap libraries
30 that are themselves based on GLib.
31
32 %package prof
33 Summary:        Profiling %{pkgname} library for GHC
34 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC.
35 Group:          Development/Libraries
36 Requires:       %{name} = %{version}-%{release}
37
38 %description prof
39 Profiling %{pkgname} library for GHC.  Should be installed when
40 GHC's profiling subsystem is needed.
41
42 %description prof -l pl.UTF-8
43 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
44 kiedy potrzebujemy systemu profilującego z GHC.
45
46 %prep
47 %setup -q -n %{pkgname}-%{version}
48
49 %build
50 runhaskell Setup.hs configure -v2 --enable-library-profiling \
51         --prefix=%{_prefix} \
52         --libdir=%{_libdir} \
53         --libexecdir=%{_libexecdir} \
54         --docdir=%{_docdir}/%{name}-%{version}
55
56 runhaskell Setup.hs build
57 runhaskell Setup.hs haddock --executables
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
62
63 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
64
65 # work around automatic haddock docs installation
66 rm -rf %{name}-%{version}-doc
67 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
68
69 runhaskell Setup.hs register \
70         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %post
76 %ghc_pkg_recache
77
78 %postun
79 %ghc_pkg_recache
80
81 %files
82 %defattr(644,root,root,755)
83 %doc NEWS
84 %doc %{name}-%{version}-doc/*
85 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
86 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
87 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
88 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
89 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
90
91 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE
92 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.hi
93
94 %files prof
95 %defattr(644,root,root,755)
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
97 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.p_hi
This page took 0.030496 seconds and 2 git commands to generate.