update to new simplified Haskell Packaging Guidelines

This commit is contained in:
Jens Petersen 2013-06-07 12:03:41 +09:00
parent 86482e1725
commit 5e2091991d
1 changed files with 39 additions and 18 deletions

View File

@ -1,18 +1,11 @@
# https://fedoraproject.org/wiki/Packaging:Haskell
# https://fedoraproject.org/wiki/PackagingDrafts/Haskell
%global pkg_name cairo
%global common_summary Binding to the Cairo library
%global common_description Cairo is a library to render high quality vector graphics.\
There exist various backends that allows rendering to Gtk windows, PDF,\
PS, PNG and SVG documents, amongst others.
Name: ghc-%{pkg_name}
Version: 0.12.4
Release: 3%{?dist}
Summary: %{common_summary}
Release: 4%{?dist}
Summary: Binding to the Cairo library
License: BSD
URL: http://hackage.haskell.org/package/%{pkg_name}
@ -24,12 +17,34 @@ BuildRequires: ghc-rpm-macros
BuildRequires: ghc-array-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-mtl-devel
# End cabal-rpm deps
BuildRequires: cairo-devel%{?_isa}
BuildRequires: gtk2hs-buildtools
BuildRequires: pkgconfig(cairo-pdf)
BuildRequires: pkgconfig(cairo-ps)
BuildRequires: pkgconfig(cairo-svg)
BuildRequires: pkgconfig(cairo)
# End cabal-rpm deps
%description
%{common_description}
Cairo is a library to render high quality vector graphics.
There exist various backends that allows rendering to Gtk windows,
PDF, PS, PNG and SVG documents, amongst others.
%package devel
Summary: Haskell %{pkg_name} library development files
Requires: ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}
Requires: %{name} = %{version}-%{release}
# Begin cabal-rpm deps:
Requires: pkgconfig(cairo-pdf)
Requires: pkgconfig(cairo-ps)
Requires: pkgconfig(cairo-svg)
Requires: pkgconfig(cairo)
# End cabal-rpm deps
%description devel
This package provides the Haskell %{pkg_name} library development files.
%prep
@ -46,20 +61,26 @@ BuildRequires: gtk2hs-buildtools
rm -r $RPM_BUILD_ROOT%{_datadir}/%{pkg_name}-%{version}
%ghc_devel_package
Requires: cairo-devel%{?_isa}
%ghc_devel_description
%post devel
%ghc_pkg_recache
%ghc_devel_post_postun
%postun devel
%ghc_pkg_recache
%ghc_files COPYRIGHT
%files -f %{name}.files
%doc COPYRIGHT
%files devel -f %{name}-devel.files
%doc demo
%changelog
* Fri Jun 07 2013 Jens Petersen <petersen@redhat.com> - 0.12.4-4
- update to new simplified Haskell Packaging Guidelines
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild