Yaakov Meir Nemoy a7489d
%global pkg_name X11
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%bcond_without doc
750d84
%bcond_without prof
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
# ghc does not emit debug information
Yaakov Meir Nemoy a7489d
%global debug_package %{nil}
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Name:           ghc-%{pkg_name}
Yaakov Meir Nemoy a7489d
Version:        1.4.5
750d84
Release:        7%{?dist}
750d84
Summary:        Haskell %{pkg_name} library
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Group:          Development/Libraries
Yaakov Meir Nemoy a7489d
License:        BSD
Yaakov Meir Nemoy a7489d
URL:            http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
Yaakov Meir Nemoy a7489d
Source0:        http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
Yaakov Meir Nemoy a7489d
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Yaakov Meir Nemoy 7a82a2
# fedora ghc archs:
Yaakov Meir Nemoy 7a82a2
ExclusiveArch:  %{ix86} x86_64 ppc alpha
750d84
BuildRequires:  ghc
Yaakov Meir Nemoy a7489d
%if %{with doc}
750d84
BuildRequires:  ghc-doc
Yaakov Meir Nemoy a7489d
%endif
Yaakov Meir Nemoy a7489d
%if %{with prof}
750d84
BuildRequires:  ghc-prof
Yaakov Meir Nemoy a7489d
%endif
Yaakov Meir Nemoy a7489d
BuildRequires: libXinerama-devel, libX11-devel, libXext-devel
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%description
Yaakov Meir Nemoy a7489d
This package provides the Haskell %{pkg_name} library.
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
The library consists of bindings to direct translations of the C bindings; for
Yaakov Meir Nemoy a7489d
documentation of these calls, refer to "The Xlib Programming
Yaakov Meir Nemoy a7489d
Manual", available online at <http: tronche.com="" gui="" x="" xlib=""/>.
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%package devel
Yaakov Meir Nemoy a7489d
Summary:        Haskell %{pkg_name} library
Yaakov Meir Nemoy a7489d
Group:          Development/Libraries
750d84
%ghcrequires ghc post preun
Yaakov Meir Nemoy a7489d
Requires:       libXinerama-devel, libX11-devel, libXext-devel
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%description devel
Yaakov Meir Nemoy a7489d
This package contains the development files for %{name}
750d84
built for ghc.
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%if %{with doc}
Yaakov Meir Nemoy a7489d
%package doc
Yaakov Meir Nemoy a7489d
Summary: Documentation for %{name}
Yaakov Meir Nemoy a7489d
Group: Development/Libraries
750d84
%ghcrequires ghc-doc post postun
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%description doc
Yaakov Meir Nemoy a7489d
This package contains development documentation files for the %{name} library.
Yaakov Meir Nemoy a7489d
%endif
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%if %{with prof}
Yaakov Meir Nemoy a7489d
%package prof
Yaakov Meir Nemoy a7489d
Summary: Profiling libraries for %{name}
Yaakov Meir Nemoy a7489d
Group: Development/Libraries
Yaakov Meir Nemoy a7489d
Requires: %{name}-devel = %{version}-%{release}
750d84
%ghcrequires ghc-prof
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%description prof
Yaakov Meir Nemoy a7489d
This package contains profiling libraries for %{name}.
Yaakov Meir Nemoy a7489d
%endif
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%prep
Yaakov Meir Nemoy a7489d
%setup -q -n %{pkg_name}-%{version}
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%build
750d84
%cabal_configure --ghc %{?with_prof:-p}
Yaakov Meir Nemoy a7489d
%cabal build
Yaakov Meir Nemoy a7489d
%if %{with doc}
Yaakov Meir Nemoy a7489d
%cabal haddock
Yaakov Meir Nemoy a7489d
%endif
Yaakov Meir Nemoy a7489d
%ghc_gen_scripts
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%install
Yaakov Meir Nemoy a7489d
rm -rf $RPM_BUILD_ROOT
Yaakov Meir Nemoy a7489d
%cabal_install
Yaakov Meir Nemoy a7489d
%ghc_install_scripts
Yaakov Meir Nemoy a7489d
%ghc_gen_filelists %{name}
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%clean
Yaakov Meir Nemoy a7489d
rm -rf $RPM_BUILD_ROOT
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%post devel
Yaakov Meir Nemoy a7489d
%ghc_register_pkg
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%if %{with doc}
Yaakov Meir Nemoy a7489d
%post doc
Yaakov Meir Nemoy a7489d
%ghc_reindex_haddock
Yaakov Meir Nemoy a7489d
%endif
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%preun devel
Yaakov Meir Nemoy a7489d
if [ "$1" -eq 0 ] ; then
Yaakov Meir Nemoy a7489d
  %ghc_unregister_pkg
Yaakov Meir Nemoy a7489d
fi
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%if %{with doc}
Yaakov Meir Nemoy a7489d
%postun doc
Yaakov Meir Nemoy a7489d
if [ "$1" -eq 0 ] ; then
Yaakov Meir Nemoy a7489d
  %ghc_reindex_haddock
Yaakov Meir Nemoy a7489d
fi
Yaakov Meir Nemoy a7489d
%endif
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%files devel -f %{name}-devel.files
Yaakov Meir Nemoy a7489d
%defattr(-,root,root,-)
Yaakov Meir Nemoy a7489d
%{_docdir}/%{name}-%{version}
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%if %{with doc}
750d84
%files doc -f %{name}-doc.files
Yaakov Meir Nemoy a7489d
%defattr(-,root,root,-)
Yaakov Meir Nemoy a7489d
%endif
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%if %{with prof}
Yaakov Meir Nemoy a7489d
%files prof -f %{name}-prof.files
Yaakov Meir Nemoy a7489d
%defattr(-,root,root,-)
Yaakov Meir Nemoy a7489d
%endif
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
%changelog
750d84
* Mon Apr 20 2009 Jens Petersen <petersen@redhat.com> - 1.4.5-7
750d84
- rebuild with ghc-6.10.2
750d84
- update to latest cabal2spec template and macros.ghc
750d84
Yaakov Meir Nemoy 45cf7d
* Sat Apr  4 2009 Yaakov M. Nemoy <yankee@localhost.localdomain> - 1.4.5-6
Yaakov Meir Nemoy 45cf7d
- rebuild bump to raise EVR manually, to match with F-10 branch
Yaakov Meir Nemoy 45cf7d
Yaakov Meir Nemoy c4e2e6
* Sun Mar  8 2009 Yaakov M. Nemoy <yankee@localhost.localdomain> - 1.4.5-5
Yaakov Meir Nemoy c4e2e6
- corrected a faulty tag
Yaakov Meir Nemoy c4e2e6
Yaakov Meir Nemoy 7a82a2
* Sun Mar  8 2009 Yaakov M. Nemoy <yankee@localhost.localdomain> - 1.4.5-4
Yaakov Meir Nemoy 7a82a2
- forgot to include the right arch tags
Yaakov Meir Nemoy 7a82a2
Yaakov Meir Nemoy a7489d
* Sat Feb 28 2009 Jens Petersen <petersen@redhat.com> - 1.4.5-3
Yaakov Meir Nemoy a7489d
- sync with cabal2spec-0.12:
Yaakov Meir Nemoy a7489d
- improve requires
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
* Mon Feb 23 2009 Yaakov M. Nemoy <loupgaroublond@gmail.com> - 1.4.5-2
Yaakov Meir Nemoy a7489d
- updated template to new guidelines
Yaakov Meir Nemoy a7489d
Yaakov Meir Nemoy a7489d
* Mon Jan  5 2009 Yaakov M. Nemoy <loupgaroublond@gmail.com> - 1.4.5-1
Yaakov Meir Nemoy a7489d
- initial packaging for Fedora created by cabal2spec
Yaakov Meir Nemoy a7489d
- added description and build requires
Yaakov Meir Nemoy a7489d
- altered license from template