3 %bcond_without prof # profiling library
5 %define pkgname libyaml
6 Summary: Low-level, streaming YAML interface
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/libyaml
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 330d02162ac413cdc435f69b5b2d1bc6
15 URL: http://hackage.haskell.org/package/libyaml
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-base >= 4.9.1
18 BuildRequires: ghc-bytestring >= 0.9.1.4
19 BuildRequires: ghc-conduit >= 1.2.8
20 BuildRequires: ghc-resourcet >= 0.3
21 BuildRequires: yaml-devel
23 BuildRequires: ghc-prof
24 BuildRequires: ghc-base-prof >= 4.9.1
25 BuildRequires: ghc-bytestring-prof >= 0.9.1.4
26 BuildRequires: ghc-conduit-prof >= 1.2.8
27 BuildRequires: ghc-resourcet-prof >= 0.3
29 BuildRequires: rpmbuild(macros) >= 1.608
31 Requires(post,postun): /usr/bin/ghc-pkg
32 Requires: ghc-base >= 4.9.1
33 Requires: ghc-bytestring >= 0.9.1.4
34 Requires: ghc-conduit >= 1.2.8
35 Requires: ghc-resourcet >= 0.3
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 # debuginfo is not useful for ghc
39 %define _enable_debug_packages 0
41 # don't compress haddock files
42 %define _noautocompressdoc *.haddock
45 This package provides a haskell wrapper over the libyaml C library
46 by Kirill Simonov. It contains the C source so you don't need to worry
47 about any non-Haskell dependencies.
50 Summary: Profiling %{pkgname} library for GHC
51 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
52 Group: Development/Libraries
53 Requires: %{name} = %{version}-%{release}
54 Requires: ghc-base-prof >= 4.9.1
55 Requires: ghc-bytestring-prof >= 0.9.1.4
56 Requires: ghc-conduit-prof >= 1.2.8
57 Requires: ghc-resourcet-prof >= 0.3
60 Profiling %{pkgname} library for GHC. Should be installed when
61 GHC's profiling subsystem is needed.
63 %description prof -l pl.UTF-8
64 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
65 kiedy potrzebujemy systemu profilującego z GHC.
68 %setup -q -n %{pkgname}-%{version}
71 runhaskell Setup.hs configure -v2 \
72 %{?with_prof:--enable-library-profiling} \
75 --libexecdir=%{_libexecdir} \
76 --docdir=%{_docdir}/%{name}-%{version}
78 runhaskell Setup.hs build
79 runhaskell Setup.hs haddock --executables
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
85 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
87 # work around automatic haddock docs installation
88 %{__rm} -rf %{name}-%{version}-doc
89 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
90 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
92 runhaskell Setup.hs register \
93 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
96 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
106 %doc README.md %{name}-%{version}-doc/*
107 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
108 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
111 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
115 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.hi
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.dyn_hi
121 %defattr(644,root,root,755)
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.p_hi