|
|
b17255a |
%define ghc_version @GHC_VERSION@
|
|
|
b17255a |
|
|
|
b17255a |
%define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{name}-%{version}
|
|
|
644d44d |
%define pkg_docdir %{_docdir}/ghc/libraries/%{name}-%{version}
|
|
|
b17255a |
|
|
|
65d3718 |
%bcond_without prof
|
|
|
65d3718 |
%bcond_without doc
|
|
|
b17255a |
|
|
|
b17255a |
# ghc does not emit debug information
|
|
|
b17255a |
%define debug_package %{nil}
|
|
|
b17255a |
|
|
|
b17255a |
Name: @PACKAGE@
|
|
|
b17255a |
Version: @VERSION@
|
|
|
b17255a |
Release: 1%{?dist}
|
|
|
b17255a |
Summary: *FIXME*
|
|
|
b17255a |
|
|
|
b17255a |
Group: *FIXME*
|
|
|
65d3718 |
License: BSD? *FIXME*
|
|
|
b17255a |
URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{name}
|
|
|
b17255a |
Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
|
|
|
b17255a |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
b17255a |
# ghc has only been bootstrapped on the following archs:
|
|
|
b17255a |
ExclusiveArch: i386 x86_64 ppc
|
|
|
b17255a |
BuildRequires: ghc = %{ghc_version}
|
|
|
65d3718 |
%if %{with prof}
|
|
|
b17255a |
BuildRequires: ghc-prof = %{ghc_version}
|
|
|
b17255a |
%endif
|
|
|
b17255a |
|
|
|
b17255a |
%description
|
|
|
b17255a |
*FIXME*
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
b17255a |
%package -n ghc-%{name}
|
|
|
b17255a |
Summary: Haskell %{name} library *FIXME*
|
|
|
b17255a |
Group: Development/Libraries
|
|
|
b17255a |
Provides: ghc-%{name}-devel = %{version}-%{release}
|
|
|
b17255a |
Requires: ghc = %{ghc_version}
|
|
|
b17255a |
Requires(post): ghc = %{ghc_version}
|
|
|
b17255a |
Requires(preun): ghc = %{ghc_version}
|
|
|
b17255a |
|
|
|
b17255a |
%description -n ghc-%{name}
|
|
|
644d44d |
Haskell %{name} library. *FIXME*
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
65d3718 |
%if %{with doc}
|
|
|
65d3718 |
%package -n ghc-%{name}-doc
|
|
|
65d3718 |
Summary: Documentation for %{name}
|
|
|
65d3718 |
Group: Development/Libraries
|
|
|
65d3718 |
Requires: ghc-doc = %{ghc_version}
|
|
|
65d3718 |
Requires(postun): ghc-doc = %{ghc_version}
|
|
|
65d3718 |
|
|
|
65d3718 |
%description -n ghc-%{name}-doc
|
|
|
65d3718 |
This package contains development documentation files for the %{name} library.
|
|
|
65d3718 |
%endif
|
|
|
65d3718 |
|
|
|
65d3718 |
|
|
|
65d3718 |
%if %{with prof}
|
|
|
644d44d |
%package -n ghc-%{name}-prof
|
|
|
644d44d |
Summary: Profiling libraries for %{name}
|
|
|
b17255a |
Group: Development/Libraries
|
|
|
ad8913e |
Requires: ghc-%{name} = %{version}-%{release}
|
|
|
b17255a |
Requires: ghc-prof = %{ghc_version}
|
|
|
b17255a |
|
|
|
644d44d |
%description -n ghc-%{name}-prof
|
|
|
644d44d |
This package contains profiling libraries for %{name}.
|
|
|
b17255a |
%endif
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
b17255a |
%prep
|
|
|
644d44d |
%setup -q
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
b17255a |
%build
|
|
|
65d3718 |
%cabal_configure --ghc %{!?without_prof:-p}
|
|
|
ad8913e |
%cabal build
|
|
|
65d3718 |
%if %{with doc}
|
|
|
ad8913e |
%cabal haddock
|
|
|
b17255a |
%endif
|
|
|
b17255a |
%ghc_gen_scripts
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
b17255a |
%install
|
|
|
b17255a |
rm -rf $RPM_BUILD_ROOT
|
|
|
b17255a |
%cabal_install
|
|
|
b17255a |
%ghc_install_scripts
|
|
|
644d44d |
%ghc_gen_filelists ghc-%{name}
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
b17255a |
%clean
|
|
|
b17255a |
rm -rf $RPM_BUILD_ROOT
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
644d44d |
%post -n ghc-%{name}
|
|
|
ad8913e |
%ghc_register_pkg
|
|
|
65d3718 |
|
|
|
65d3718 |
|
|
|
65d3718 |
%if %{with doc}
|
|
|
65d3718 |
%post -n ghc-%{name}-doc
|
|
|
b17255a |
%ghc_reindex_haddock
|
|
|
b17255a |
%endif
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
644d44d |
%preun -n ghc-%{name}
|
|
|
ad8913e |
if [ "$1" -eq 0 ] ; then
|
|
|
ad8913e |
%ghc_unregister_pkg
|
|
|
ad8913e |
fi
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
65d3718 |
%if %{with doc}
|
|
|
65d3718 |
%postun -n ghc-%{name}-doc
|
|
|
b17255a |
if [ "$1" -eq 0 ] ; then
|
|
|
b17255a |
%ghc_reindex_haddock
|
|
|
b17255a |
fi
|
|
|
65d3718 |
%endif
|
|
|
65d3718 |
|
|
|
b17255a |
|
|
|
644d44d |
%files
|
|
|
b17255a |
%defattr(-,root,root,-)
|
|
|
b17255a |
%doc LICENSE
|
|
|
644d44d |
%{_bindir}/%{name}
|
|
|
644d44d |
|
|
|
65d3718 |
|
|
|
644d44d |
%files -n ghc-%{name} -f ghc-%{name}.files
|
|
|
644d44d |
%defattr(-,root,root,-)
|
|
|
65d3718 |
|
|
|
65d3718 |
|
|
|
65d3718 |
%if %{with doc}
|
|
|
65d3718 |
%files -n ghc-%{name}-doc
|
|
|
65d3718 |
%defattr(-,root,root,-)
|
|
|
b17255a |
%{pkg_docdir}
|
|
|
b17255a |
%endif
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
65d3718 |
%if %{with prof}
|
|
|
644d44d |
%files -n ghc-%{name}-prof -f ghc-%{name}-prof.files
|
|
|
b17255a |
%defattr(-,root,root,-)
|
|
|
b17255a |
%endif
|
|
|
b17255a |
|
|
|
b17255a |
|
|
|
b17255a |
%changelog
|
|
|
b17255a |
* @DATE@ @PACKAGER@ <@EMAIL@> - @VERSION@-1
|
|
|
b17255a |
- initial packaging for Fedora created by cabal2spec
|