|
|
2033c4d |
%define pkg_name zlib
|
|
|
2033c4d |
%define ghc_version 6.10.1
|
|
|
2033c4d |
|
|
|
2033c4d |
%define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version}
|
|
|
2033c4d |
%define pkg_docdir %{_docdir}/ghc/libraries/%{pkg_name}-%{version}
|
|
|
2033c4d |
|
|
|
2033c4d |
%bcond_without prof
|
|
|
2033c4d |
%bcond_without doc
|
|
|
2033c4d |
|
|
|
2033c4d |
# ghc does not emit debug information
|
|
|
2033c4d |
%define debug_package %{nil}
|
|
|
2033c4d |
|
|
|
2033c4d |
Name: ghc-%{pkg_name}
|
|
|
2033c4d |
Version: 0.5.0.0
|
|
|
2033c4d |
Release: 5%{?dist}
|
|
|
2033c4d |
License: BSD
|
|
|
2033c4d |
Group: Development/Libraries
|
|
|
2033c4d |
URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
|
|
|
2033c4d |
Source: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
|
|
|
2033c4d |
Summary: Haskell compression and decompression library binding
|
|
|
2033c4d |
Provides: %{name}-devel = %{version}-%{release}
|
|
|
2033c4d |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
2033c4d |
ExclusiveArch: i386 x86_64 ppc
|
|
|
2033c4d |
BuildRequires: ghc = %{ghc_version}
|
|
|
2033c4d |
%if %{with doc}
|
|
|
2033c4d |
BuildRequires: ghc-doc = %{ghc_version}
|
|
|
2033c4d |
%endif
|
|
|
2033c4d |
%if %{with prof}
|
|
|
2033c4d |
BuildRequires: ghc-prof = %{ghc_version}
|
|
|
2033c4d |
%endif
|
|
|
2033c4d |
BuildRequires: zlib-devel
|
|
|
2033c4d |
Requires: zlib-devel
|
|
|
2033c4d |
Requires: ghc = %{ghc_version}
|
|
|
2033c4d |
Requires(post): ghc = %{ghc_version}
|
|
|
2033c4d |
Requires(preun): ghc = %{ghc_version}
|
|
|
2033c4d |
|
|
|
2033c4d |
%description
|
|
|
2033c4d |
This package provides a pure Haskell interface for compressing and
|
|
|
2033c4d |
decompressing streams of data represented as lazy ByteStrings. It uses
|
|
|
2033c4d |
the zlib C library so it has high performance. It supports the "zlib",
|
|
|
2033c4d |
"gzip" and "raw" compression formats.
|
|
|
2033c4d |
|
|
|
2033c4d |
It provides a convenient high level API suitable for most tasks. For
|
|
|
2033c4d |
the few cases where more control is needed, it provides access to the
|
|
|
2033c4d |
full zlib feature set.
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%if %{with doc}
|
|
|
2033c4d |
%package doc
|
|
|
2033c4d |
Summary: Documentation for %{name}
|
|
|
2033c4d |
Group: Development/Libraries
|
|
|
2033c4d |
Requires: ghc-doc = %{ghc_version}
|
|
|
2033c4d |
Requires(post): ghc-doc = %{ghc_version}
|
|
|
2033c4d |
Requires(postun): ghc-doc = %{ghc_version}
|
|
|
2033c4d |
|
|
|
2033c4d |
%description doc
|
|
|
2033c4d |
This package contains development documentation files for the %{name} library.
|
|
|
2033c4d |
%endif
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%if %{with prof}
|
|
|
2033c4d |
%package prof
|
|
|
2033c4d |
Summary: Profiling libraries for %{name}
|
|
|
2033c4d |
Group: Development/Libraries
|
|
|
2033c4d |
Requires: %{name} = %{version}-%{release}
|
|
|
2033c4d |
Requires: ghc-prof = %{ghc_version}
|
|
|
2033c4d |
|
|
|
2033c4d |
%description prof
|
|
|
2033c4d |
This package contains profiling libraries for %{name}.
|
|
|
2033c4d |
%endif
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%prep
|
|
|
2033c4d |
%setup -q -n %{pkg_name}-%{version}
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%build
|
|
|
2033c4d |
%cabal_configure --ghc %{!?without_prof:-p}
|
|
|
2033c4d |
%cabal build
|
|
|
2033c4d |
%if %{with doc}
|
|
|
2033c4d |
%cabal haddock
|
|
|
2033c4d |
%endif
|
|
|
2033c4d |
%ghc_gen_scripts
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%install
|
|
|
2033c4d |
rm -rf $RPM_BUILD_ROOT
|
|
|
2033c4d |
%cabal_install
|
|
|
2033c4d |
%ghc_install_scripts
|
|
|
2033c4d |
%ghc_gen_filelists %{name}
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%clean
|
|
|
2033c4d |
rm -rf $RPM_BUILD_ROOT
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%post
|
|
|
2033c4d |
%ghc_register_pkg
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%if %{with doc}
|
|
|
2033c4d |
%post doc
|
|
|
2033c4d |
%ghc_reindex_haddock
|
|
|
2033c4d |
%endif
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%preun
|
|
|
2033c4d |
if [ "$1" -eq 0 ] ; then
|
|
|
2033c4d |
%ghc_unregister_pkg
|
|
|
2033c4d |
fi
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%if %{with doc}
|
|
|
2033c4d |
%postun doc
|
|
|
2033c4d |
if [ "$1" -eq 0 ] ; then
|
|
|
2033c4d |
%ghc_reindex_haddock
|
|
|
2033c4d |
fi
|
|
|
2033c4d |
%endif
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%files -f %{name}.files
|
|
|
2033c4d |
%defattr(-,root,root,-)
|
|
|
2033c4d |
%doc LICENSE
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%if %{with doc}
|
|
|
2033c4d |
%files doc
|
|
|
2033c4d |
%defattr(-,root,root,-)
|
|
|
2033c4d |
%{pkg_docdir}
|
|
|
2033c4d |
%endif
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%if %{with prof}
|
|
|
2033c4d |
%files prof -f %{name}-prof.files
|
|
|
2033c4d |
%defattr(-,root,root,-)
|
|
|
2033c4d |
%endif
|
|
|
2033c4d |
|
|
|
2033c4d |
|
|
|
2033c4d |
%changelog
|
|
|
2033c4d |
* Mon Feb 9 2009 Jens Petersen <petersen@redhat.com> - 0.5.0.0-5
|
|
|
2033c4d |
- rebuild to fix unexpanded post preun macros
|
|
|
2033c4d |
- add doc subpackage and BR ghc-doc
|
|
|
2033c4d |
- add doc requires(post) ghc-doc
|
|
|
2033c4d |
|
|
|
2033c4d |
* Mon Dec 22 2008 Jens Petersen <petersen@redhat.com> - 0.5.0.0-4
|
|
|
2033c4d |
- use bcond for doc and prof build flags (Till Maas, #426751)
|
|
|
2033c4d |
|
|
|
2033c4d |
* Mon Dec 1 2008 Jens Petersen <petersen@redhat.com> - 0.5.0.0-3
|
|
|
2033c4d |
- sync with lib template:
|
|
|
2033c4d |
- add build_prof and build_doc
|
|
|
2033c4d |
- prof requires main package
|
|
|
2033c4d |
- update scriptlet macro names
|
|
|
2033c4d |
|
|
|
2033c4d |
* Tue Nov 25 2008 Jens Petersen <petersen@redhat.com> - 0.5.0.0-2
|
|
|
2033c4d |
- build with ghc-6.10.1
|
|
|
2033c4d |
- no longer buildrequire haddock09
|
|
|
2033c4d |
- provide devel
|
|
|
2033c4d |
- add exclusivearch for current ghc archs
|
|
|
2033c4d |
- reindex haddock docs only when uninstalling in postun
|
|
|
2033c4d |
|
|
|
2033c4d |
* Tue Nov 11 2008 Bryan O'Sullivan <bos@serpentine.com> - 0.5.0.0-1
|
|
|
2033c4d |
- Update to 0.5.0.0
|
|
|
2033c4d |
|
|
|
2033c4d |
* Thu Oct 23 2008 Jens Petersen <petersen@redhat.com> - 0.4.0.4-2
|
|
|
2033c4d |
- update for current rawhide
|
|
|
2033c4d |
- add pkg_docdir and remove hsc_name
|
|
|
2033c4d |
- use haddock09
|
|
|
2033c4d |
|
|
|
2033c4d |
* Tue Oct 14 2008 Bryan O'Sullivan <bos@serpentine.com> - 0.4.0.4-1
|
|
|
2033c4d |
- Revised to follow Haskell packaging guidelines
|
|
|
2033c4d |
|
|
|
2033c4d |
* Sun Feb 17 2008 Yaakov Nemoy <haskell.rpms@hexago.nl> - 0.4.0.2-1
|
|
|
2033c4d |
- added in url
|
|
|
2033c4d |
|
|
|
2033c4d |
* Sun Feb 17 2008 cabal-rpm <cabal-devel@haskell.org> - 0.4.0.2-1
|
|
|
2033c4d |
- spec file autogenerated by cabal-rpm
|