From ace2d13815ff54b8da3ad5db6cfc8c98d191aaa4 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Mon, 23 Dec 2013 22:02:28 +0100 Subject: [PATCH] - pl, unified, added prof bcond, release 2 --- ghc-zlib-bindings.spec | 63 +++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 19 deletions(-) diff --git a/ghc-zlib-bindings.spec b/ghc-zlib-bindings.spec index 1ca1acb..800a190 100644 --- a/ghc-zlib-bindings.spec +++ b/ghc-zlib-bindings.spec @@ -1,42 +1,66 @@ +# +# Conditional build: +%bcond_without prof # profiling library +# %define pkgname zlib-bindings Summary: Low-level bindings to the zlib package +Summary(pl.UTF-8): Niskopoziomowe wiązania do pakietu zlib Name: ghc-%{pkgname} Version: 0.1.1.3 -Release: 1 +Release: 2 License: BSD Group: Development/Languages -Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz +#Source0Download: http://hackage.haskell.org/package/zlib-bindings +Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz # Source0-md5: d0a535c01d6773e9ef9318e43707601c -URL: http://hackage.haskell.org/package/PACKAGE_NAME/ +URL: http://hackage.haskell.org/package/zlib-bindings BuildRequires: ghc >= 6.12.3 -BuildRequires: ghc-prof -BuildRequires: ghc-zlib -BuildRequires: ghc-zlib-prof +BuildRequires: ghc-base >= 4 +BuildRequires: ghc-base < 5 +BuildRequires: ghc-bytestring >= 0.9.1.4 +BuildRequires: ghc-zlib >= 0.5.2.0 +%if %{with prof} +BuildRequires: ghc-prof >= 6.12.3 +BuildRequires: ghc-base-prof >= 4 +BuildRequires: ghc-base-prof < 5 +BuildRequires: ghc-bytestring-prof >= 0.9.1.4 +BuildRequires: ghc-zlib-prof >= 0.5.2.0 +%endif BuildRequires: rpmbuild(macros) >= 1.608 -%requires_releq ghc Requires(post,postun): /usr/bin/ghc-pkg -Requires: ghc-zlib +%requires_releq ghc +Requires: ghc-base >= 4 +Requires: ghc-base < 5 +Requires: ghc-bytestring >= 0.9.1.4 +Requires: ghc-zlib >= 0.5.2.0 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # debuginfo is not useful for ghc %define _enable_debug_packages 0 -# don't compress haddoc files +# don't compress haddock files %define _noautocompressdoc *.haddock %description Provides necessary functions for producing a streaming interface. +%description -l pl.UTF-8 +Ten pakiet dostarcza funkcje niezbędne do tworzenia interfejsu +strumieniowego. + %package prof Summary: Profiling %{pkgname} library for GHC Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: ghc-zlib-prof +Requires: ghc-base-prof >= 4 +Requires: ghc-base-prof < 5 +Requires: ghc-bytestring-prof >= 0.9.1.4 +Requires: ghc-zlib-prof >= 0.5.2.0 %description prof -Profiling %{pkgname} library for GHC. Should be installed when -GHC's profiling subsystem is needed. +Profiling %{pkgname} library for GHC. Should be installed when GHC's +profiling subsystem is needed. %description prof -l pl.UTF-8 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana @@ -46,7 +70,8 @@ kiedy potrzebujemy systemu profilującego z GHC. %setup -q -n %{pkgname}-%{version} %build -runhaskell Setup.lhs configure -v2 --enable-library-profiling \ +runhaskell Setup.lhs configure -v2 \ + %{?with_prof:--enable-library-profiling} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} \ @@ -67,7 +92,7 @@ cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} runhaskell Setup.lhs register \ - --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf + --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf %clean rm -rf $RPM_BUILD_ROOT @@ -83,17 +108,17 @@ rm -rf $RPM_BUILD_ROOT %doc %{name}-%{version}-doc/* %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} -%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o -%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a -%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a - +%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSzlib-bindings-%{version}.o +%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}.a %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.hi %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.hi +%if %{with prof} %files prof %defattr(644,root,root,755) -%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a +%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}_p.a %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.p_hi %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.p_hi +%endif -- 2.44.0