]> git.pld-linux.org Git - packages/ghc-zlib-bindings.git/commitdiff
- pl, unified, added prof bcond, release 2 auto/th/ghc-zlib-bindings-0.1.1.3-2
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 23 Dec 2013 21:02:28 +0000 (22:02 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Mon, 23 Dec 2013 21:02:28 +0000 (22:02 +0100)
ghc-zlib-bindings.spec

index 1ca1acb68cda93bb53f427c674cd42915e98afaa..800a19058cbabec370a2265234d20a81bd0f7e60 100644 (file)
@@ -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
This page took 0.072574 seconds and 4 git commands to generate.