From 07b2fd54625f7f00b5a2b2aae5f06b018eeec3c6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 25 Dec 2009 15:56:06 +0000 Subject: [PATCH] - update for ghc-6.12.1: add shared library support - use new ghc*_requires macros: needs ghc-rpm-macros 0.4.0 - add common_summary and common_description --- ghc-fgl.spec | 83 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 34 deletions(-) diff --git a/ghc-fgl.spec b/ghc-fgl.spec index 0756d82..07bf5b7 100644 --- a/ghc-fgl.spec +++ b/ghc-fgl.spec @@ -1,26 +1,29 @@ %global pkg_name fgl +%global common_summary Haskell Functional Graph Library + +%global common_description Martin Erwig's Functional Graph Library. + %bcond_without doc %bcond_without prof +%bcond_without shared # ghc does not emit debug information -%global debug_package %{nil} +#%%global debug_package %{nil} Name: ghc-%{pkg_name} # part of haskell-platform-2009.2.0.2 Version: 5.4.2.2 -Release: 1%{?dist} -Summary: Haskell %{pkg_name} library +Release: 2%{?dist} +Summary: %{common_summary} -Group: Development/Libraries +Group: System Environment/Libraries License: BSD URL: http://web.engr.oregonstate.edu/~erwig/fgl/haskell/ Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # fedora ghc archs: ExclusiveArch: %{ix86} x86_64 ppc alpha -BuildRequires: ghc -BuildRequires: ghc-rpm-macros +BuildRequires: ghc, ghc-rpm-macros >= 0.4.0 %if %{with doc} BuildRequires: ghc-doc %endif @@ -29,45 +32,46 @@ BuildRequires: ghc-prof %endif %description -This package provides the Haskell %{pkg_name} library for ghc. This -is a library of types and functions for addressing graph problems. +%{common_description} +%if %{with shared} +This package provides the shared library. +%endif %package devel -Summary: Haskell %{pkg_name} library +Summary: %{common_summary} development files Group: Development/Libraries -Requires: ghc = %{ghc_version} -Requires(post): ghc = %{ghc_version} -Requires(preun): ghc = %{ghc_version} +%{?ghc_requires} %description devel -This package contains the development files for %{name} -built for ghc-%{ghc_version}. +%{common_description} + +This package contains the development files. %if %{with doc} %package doc -Summary: Documentation for %{name} +Summary: Documentation for %{common_summary} Group: Development/Libraries -Requires: ghc-doc = %{ghc_version} -Requires(post): ghc-doc = %{ghc_version} -Requires(postun): ghc-doc = %{ghc_version} +%{?ghc_doc_requires} %description doc -This package contains development documentation files for the %{name} library. +%{common_description} + +This package contains development documentation files. %endif %if %{with prof} %package prof -Summary: Profiling libraries for %{name} +Summary: Profiling libraries for %{common_summary} Group: Development/Libraries -Requires: %{name}-devel = %{version}-%{release} -Requires: ghc-prof = %{ghc_version} +%{?ghc_prof_requires} %description prof -This package contains profiling libraries for %{name} -built for ghc-%{ghc_version}. +%{common_description} + +This package contains the profiling library. %endif @@ -81,13 +85,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} @@ -96,7 +99,7 @@ rm -rf $RPM_BUILD_ROOT %post devel -%ghc_register_pkg +ghc-pkg recache %if %{with doc} @@ -105,10 +108,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} @@ -119,9 +120,18 @@ fi %endif -%files devel -f %{name}-devel.files +%if %{with shared} +%files -f %{name}.files %defattr(-,root,root,-) %{_docdir}/%{name}-%{version} +%endif + + +%files devel -f %{name}-devel.files +%defattr(-,root,root,-) +%if %{without shared} +%{_docdir}/%{name}-%{version} +%endif %if %{with doc} @@ -137,5 +147,10 @@ fi %changelog +* Sat Dec 26 2009 Jens Petersen - 5.4.2.2-2 +- update for ghc-6.12.1: add shared library support +- use new ghc*_requires macros: needs ghc-rpm-macros 0.4.0 +- add common_summary and common_description + * Wed Aug 12 2009 Bryan O'Sullivan - 5.4.2.2-1 - initial packaging for Fedora created by cabal2spec