From fc22668a9f1c59e41fcfb18364d9180f99d399c1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 16 Dec 2009 10:00:18 +0000 Subject: [PATCH] - build for ghc-6.12.1 - added shared library support: needs ghc-rpm-macros 0.3.1 - use cabal_pkg_conf to generate package.conf.d file and use ghc-pkg recache --- ghc-zlib.spec | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/ghc-zlib.spec b/ghc-zlib.spec index 064b64e..f5f11d8 100644 --- a/ghc-zlib.spec +++ b/ghc-zlib.spec @@ -2,6 +2,7 @@ %bcond_without doc %bcond_without prof +%bcond_without shared # ghc does not emit debug information %global debug_package %{nil} @@ -9,17 +10,16 @@ Name: ghc-%{pkg_name} # part of haskell-platform-2009.2.0.2 Version: 0.5.0.0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Haskell compression and decompression library binding Group: Development/Libraries License: BSD URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name} -Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz # fedora ghc archs: ExclusiveArch: %{ix86} x86_64 ppc alpha -BuildRequires: ghc, ghc-rpm-macros +BuildRequires: ghc, ghc-rpm-macros >= 0.3.1 %if %{with doc} BuildRequires: ghc-doc %endif @@ -41,10 +41,13 @@ full zlib feature set. %package devel Summary: Haskell %{pkg_name} library Group: Development/Libraries -Requires: zlib-devel Requires: ghc = %{ghc_version} Requires(post): ghc = %{ghc_version} -Requires(preun): ghc = %{ghc_version} +Requires(postun): ghc = %{ghc_version} +%if %{with shared} +Requires: %{name} = %{version}-%{release} +%endif +Requires: zlib-devel %description devel This package contains the development files for %{name} @@ -87,13 +90,12 @@ built for ghc-%{ghc_version}. %if %{with doc} %cabal haddock %endif -%ghc_gen_scripts %install -rm -rf $RPM_BUILD_ROOT %cabal_install -%ghc_install_scripts +%cabal_pkg_conf + %ghc_gen_filelists %{name} @@ -102,7 +104,7 @@ rm -rf $RPM_BUILD_ROOT %post devel -%ghc_register_pkg +ghc-pkg recache %if %{with doc} @@ -111,10 +113,8 @@ rm -rf $RPM_BUILD_ROOT %endif -%preun devel -if [ "$1" -eq 0 ] ; then - %ghc_unregister_pkg -fi +%postun devel +ghc-pkg recache %if %{with doc} @@ -125,6 +125,13 @@ fi %endif +%if %{with shared} +%files -f %{name}.files +%defattr(-,root,root,-) +%{_docdir}/%{name}-%{version} +%endif + + %files devel -f %{name}-devel.files %defattr(-,root,root,-) %{_docdir}/%{name}-%{version} @@ -143,6 +150,11 @@ fi %changelog +* Wed Dec 16 2009 Jens Petersen - 0.5.0.0-11 +- build for ghc-6.12.1 +- added shared library support: needs ghc-rpm-macros 0.3.1 +- use cabal_pkg_conf to generate package.conf.d file and use ghc-pkg recache + * Fri Jul 24 2009 Fedora Release Engineering - 0.5.0.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild @@ -157,7 +169,7 @@ fi - add devel subpackage - use ix86 macro for archs and add alpha - use global rather than define -- make devel own docdir for now +- make devel subpackage own docdir for now * Tue Feb 24 2009 Fedora Release Engineering - 0.5.0.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild