- rebuild to fix unexpanded post preun macros
- add doc subpackage and BR ghc-doc - add doc requires(post) ghc-doc
This commit is contained in:
parent
fd499780a5
commit
97c7317a2f
@ -1,8 +1,8 @@
|
|||||||
%define pkg_name zlib
|
%define pkg_name zlib
|
||||||
%define ghc_version %(ghc --numeric-version)
|
%define ghc_version 6.10.1
|
||||||
|
|
||||||
%define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version}
|
%define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version}
|
||||||
%define pkg_docdir %{_docdir}/ghc/libraries/%{pkg_name}
|
%define pkg_docdir %{_docdir}/ghc/libraries/%{pkg_name}-%{version}
|
||||||
|
|
||||||
%bcond_without prof
|
%bcond_without prof
|
||||||
%bcond_without doc
|
%bcond_without doc
|
||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
Name: ghc-%{pkg_name}
|
Name: ghc-%{pkg_name}
|
||||||
Version: 0.5.0.0
|
Version: 0.5.0.0
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
|
URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
|
||||||
@ -21,15 +21,18 @@ Summary: Haskell compression and decompression library binding
|
|||||||
Provides: %{name}-devel = %{version}-%{release}
|
Provides: %{name}-devel = %{version}-%{release}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
ExclusiveArch: i386 x86_64 ppc
|
ExclusiveArch: i386 x86_64 ppc
|
||||||
BuildRequires: ghc
|
BuildRequires: ghc = %{ghc_version}
|
||||||
BuildRequires: ghc-prof
|
%if %{with doc}
|
||||||
|
BuildRequires: ghc-doc = %{ghc_version}
|
||||||
|
%endif
|
||||||
|
%if %{with prof}
|
||||||
|
BuildRequires: ghc-prof = %{ghc_version}
|
||||||
|
%endif
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
Requires: zlib-devel
|
Requires: zlib-devel
|
||||||
Requires: ghc = %{ghc_version}
|
Requires: ghc = %{ghc_version}
|
||||||
# for ghc-pkg and haddock
|
|
||||||
Requires(post): ghc = %{ghc_version}
|
Requires(post): ghc = %{ghc_version}
|
||||||
Requires(preun): ghc = %{ghc_version}
|
Requires(preun): ghc = %{ghc_version}
|
||||||
Requires(postun): ghc = %{ghc_version}
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides a pure Haskell interface for compressing and
|
This package provides a pure Haskell interface for compressing and
|
||||||
@ -42,6 +45,19 @@ the few cases where more control is needed, it provides access to the
|
|||||||
full zlib feature set.
|
full zlib feature set.
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for %{name}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: ghc-doc = %{ghc_version}
|
||||||
|
Requires(post): ghc-doc = %{ghc_version}
|
||||||
|
Requires(postun): ghc-doc = %{ghc_version}
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
This package contains development documentation files for the %{name} library.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with prof}
|
%if %{with prof}
|
||||||
%package prof
|
%package prof
|
||||||
Summary: Profiling libraries for %{name}
|
Summary: Profiling libraries for %{name}
|
||||||
@ -78,9 +94,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%ghc_register_pkg
|
%ghc_register_pkg
|
||||||
|
|
||||||
|
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
|
%post doc
|
||||||
%ghc_reindex_haddock
|
%ghc_reindex_haddock
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -91,18 +110,22 @@ if [ "$1" -eq 0 ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
%postun
|
|
||||||
if [ "$1" -eq 0 ] ; then
|
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
|
%postun doc
|
||||||
|
if [ "$1" -eq 0 ] ; then
|
||||||
%ghc_reindex_haddock
|
%ghc_reindex_haddock
|
||||||
%endif
|
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
|
|
||||||
|
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
|
%files doc
|
||||||
|
%defattr(-,root,root,-)
|
||||||
%{pkg_docdir}
|
%{pkg_docdir}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -114,8 +137,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Dec 17 2008 Jens Petersen <petersen@redhat.com> - 0.5.0.0-4
|
* Mon Feb 9 2009 Jens Petersen <petersen@redhat.com> - 0.5.0.0-5
|
||||||
- no longer hard code ghc_version (Till Maas, #426751)
|
- rebuild to fix unexpanded post preun macros
|
||||||
|
- add doc subpackage and BR ghc-doc
|
||||||
|
- add doc requires(post) ghc-doc
|
||||||
|
|
||||||
|
* Mon Dec 22 2008 Jens Petersen <petersen@redhat.com> - 0.5.0.0-4
|
||||||
- use bcond for doc and prof build flags (Till Maas, #426751)
|
- use bcond for doc and prof build flags (Till Maas, #426751)
|
||||||
|
|
||||||
* Mon Dec 1 2008 Jens Petersen <petersen@redhat.com> - 0.5.0.0-3
|
* Mon Dec 1 2008 Jens Petersen <petersen@redhat.com> - 0.5.0.0-3
|
||||||
|
Loading…
Reference in New Issue
Block a user