3 %bcond_without prof # profiling library
5 %define pkgname zlib-bindings
6 Summary: Low-level bindings to the zlib package
7 Summary(pl.UTF-8): Niskopoziomowe wiązania do pakietu zlib
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/zlib-bindings
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: c8c3d5e20a5c46612f0715f777a2823e
16 URL: http://hackage.haskell.org/package/zlib-bindings
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base >= 4
19 BuildRequires: ghc-bytestring >= 0.9.1.4
20 BuildRequires: ghc-zlib >= 0.5.2.0
22 BuildRequires: ghc-prof >= 6.12.3
23 BuildRequires: ghc-base-prof >= 4
24 BuildRequires: ghc-bytestring-prof >= 0.9.1.4
25 BuildRequires: ghc-zlib-prof >= 0.5.2.0
27 BuildRequires: rpmbuild(macros) >= 1.608
28 Requires(post,postun): /usr/bin/ghc-pkg
30 Requires: ghc-base >= 4
31 Requires: ghc-bytestring >= 0.9.1.4
32 Requires: ghc-zlib >= 0.5.2.0
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 # debuginfo is not useful for ghc
36 %define _enable_debug_packages 0
38 # don't compress haddock files
39 %define _noautocompressdoc *.haddock
42 Provides necessary functions for producing a streaming interface.
44 %description -l pl.UTF-8
45 Ten pakiet dostarcza funkcje niezbędne do tworzenia interfejsu
49 Summary: Profiling %{pkgname} library for GHC
50 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
51 Group: Development/Libraries
52 Requires: %{name} = %{version}-%{release}
53 Requires: ghc-base-prof >= 4
54 Requires: ghc-bytestring-prof >= 0.9.1.4
55 Requires: ghc-zlib-prof >= 0.5.2.0
58 Profiling %{pkgname} library for GHC. Should be installed when GHC's
59 profiling subsystem is needed.
61 %description prof -l pl.UTF-8
62 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
63 kiedy potrzebujemy systemu profilującego z GHC.
66 %setup -q -n %{pkgname}-%{version}
69 runhaskell Setup.lhs configure -v2 \
70 %{?with_prof:--enable-library-profiling} \
73 --libexecdir=%{_libexecdir} \
74 --docdir=%{_docdir}/%{name}-%{version}
76 runhaskell Setup.lhs build
77 runhaskell Setup.lhs haddock --executables
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
83 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
85 # work around automatic haddock docs installation
86 %{__rm} -rf %{name}-%{version}-doc
87 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
88 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
90 runhaskell Setup.lhs register \
91 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
94 rm -rf $RPM_BUILD_ROOT
103 %defattr(644,root,root,755)
104 %doc %{name}-%{version}-doc/*
105 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
106 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}-*.so
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}-*.a
109 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}-*_p.a
110 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.hi
112 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.dyn_hi
113 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.hi
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.dyn_hi
119 %defattr(644,root,root,755)
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}-*_p.a
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.p_hi
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.p_hi