- update packaging for ghc-6.12.1

- added shared library support: needs ghc-rpm-macros 0.3.1
- rebuild for ghc-X11-1.5.0.0
This commit is contained in:
Jens Petersen 2009-12-22 16:20:13 +00:00
parent 22da9f5e63
commit 26ad551c65
1 changed files with 29 additions and 15 deletions

View File

@ -2,23 +2,23 @@
%bcond_without doc
%bcond_without prof
%bcond_without shared
# ghc does not emit debug information
%global debug_package %{nil}
Name: ghc-%{pkg_name}
Version: 0.3
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Haskell bindings to the Xft library
Group: Development/Libraries
Group: System Environment/Libraries
License: LGPLv2
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)
# fedora ghc archs:
ExclusiveArch: %{ix86} x86_64 ppc alpha
BuildRequires: ghc, ghc-rpm-macros
BuildRequires: ghc, ghc-rpm-macros >= 0.3.1
BuildRequires: libXft-devel
BuildRequires: ghc-X11-devel
BuildRequires: ghc-utf8-string-devel
@ -40,11 +40,14 @@ and some Xrender parts.
%package devel
Summary: Haskell %{pkg_name} library
Summary: Haskell %{pkg_name} library development files
Group: Development/Libraries
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: libXft-devel
Requires: ghc-X11-devel = %ghc_pkg_ver X11
Requires: ghc-utf8-string-devel = %ghc_pkg_ver utf8-string
@ -95,13 +98,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}
@ -110,7 +112,7 @@ rm -rf $RPM_BUILD_ROOT
%post devel
%ghc_register_pkg
ghc-pkg recache
%if %{with doc}
@ -119,10 +121,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}
@ -133,9 +133,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}
@ -151,6 +160,11 @@ fi
%changelog
* Wed Dec 23 2009 Jens Petersen <petersen@redhat.com> - 0.3-5
- update packaging for ghc-6.12.1
- added shared library support: needs ghc-rpm-macros 0.3.1
- rebuild for ghc-X11-1.5.0.0
* Mon Nov 16 2009 Jens Petersen <petersen@redhat.com> - 0.3-4
- rebuild for ghc-X11-1.4.6.1
- use %%ghc_pkg_ver for lib dep requires