2009-09-14 03:15:21 +00:00
|
|
|
%global pkg_name fgl
|
|
|
|
|
2009-12-25 15:56:06 +00:00
|
|
|
%global common_summary Haskell Functional Graph Library
|
|
|
|
|
|
|
|
%global common_description Martin Erwig's Functional Graph Library.
|
|
|
|
|
2009-09-14 03:15:21 +00:00
|
|
|
%bcond_without doc
|
|
|
|
%bcond_without prof
|
2009-12-25 15:56:06 +00:00
|
|
|
%bcond_without shared
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
# ghc does not emit debug information
|
2009-12-25 15:56:06 +00:00
|
|
|
#%%global debug_package %{nil}
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
Name: ghc-%{pkg_name}
|
2009-09-24 04:10:51 +00:00
|
|
|
# part of haskell-platform-2009.2.0.2
|
2009-09-14 03:15:21 +00:00
|
|
|
Version: 5.4.2.2
|
2009-12-25 15:56:06 +00:00
|
|
|
Release: 2%{?dist}
|
|
|
|
Summary: %{common_summary}
|
2009-09-14 03:15:21 +00:00
|
|
|
|
2009-12-25 15:56:06 +00:00
|
|
|
Group: System Environment/Libraries
|
2009-09-14 03:15:21 +00:00
|
|
|
License: BSD
|
|
|
|
URL: http://web.engr.oregonstate.edu/~erwig/fgl/haskell/
|
|
|
|
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
|
|
|
|
# fedora ghc archs:
|
|
|
|
ExclusiveArch: %{ix86} x86_64 ppc alpha
|
2009-12-25 15:56:06 +00:00
|
|
|
BuildRequires: ghc, ghc-rpm-macros >= 0.4.0
|
2009-09-14 03:15:21 +00:00
|
|
|
%if %{with doc}
|
|
|
|
BuildRequires: ghc-doc
|
|
|
|
%endif
|
|
|
|
%if %{with prof}
|
|
|
|
BuildRequires: ghc-prof
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
2009-12-25 15:56:06 +00:00
|
|
|
%{common_description}
|
|
|
|
%if %{with shared}
|
|
|
|
This package provides the shared library.
|
|
|
|
%endif
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
2009-12-25 15:56:06 +00:00
|
|
|
Summary: %{common_summary} development files
|
2009-09-14 03:15:21 +00:00
|
|
|
Group: Development/Libraries
|
2009-12-25 15:56:06 +00:00
|
|
|
%{?ghc_requires}
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
%description devel
|
2009-12-25 15:56:06 +00:00
|
|
|
%{common_description}
|
|
|
|
|
|
|
|
This package contains the development files.
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
%package doc
|
2009-12-25 15:56:06 +00:00
|
|
|
Summary: Documentation for %{common_summary}
|
2009-09-14 03:15:21 +00:00
|
|
|
Group: Development/Libraries
|
2009-12-25 15:56:06 +00:00
|
|
|
%{?ghc_doc_requires}
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
%description doc
|
2009-12-25 15:56:06 +00:00
|
|
|
%{common_description}
|
|
|
|
|
|
|
|
This package contains development documentation files.
|
2009-09-14 03:15:21 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with prof}
|
|
|
|
%package prof
|
2009-12-25 15:56:06 +00:00
|
|
|
Summary: Profiling libraries for %{common_summary}
|
2009-09-14 03:15:21 +00:00
|
|
|
Group: Development/Libraries
|
2009-12-25 15:56:06 +00:00
|
|
|
%{?ghc_prof_requires}
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
%description prof
|
2009-12-25 15:56:06 +00:00
|
|
|
%{common_description}
|
|
|
|
|
|
|
|
This package contains the profiling library.
|
2009-09-14 03:15:21 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{pkg_name}-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%cabal_configure --ghc %{?with_prof:-p}
|
|
|
|
%cabal build
|
|
|
|
%if %{with doc}
|
|
|
|
%cabal haddock
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cabal_install
|
2009-12-25 15:56:06 +00:00
|
|
|
%cabal_pkg_conf
|
|
|
|
|
2009-09-14 03:15:21 +00:00
|
|
|
%ghc_gen_filelists %{name}
|
|
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
|
|
%post devel
|
2009-12-25 15:56:06 +00:00
|
|
|
ghc-pkg recache
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
%post doc
|
|
|
|
%ghc_reindex_haddock
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2009-12-25 15:56:06 +00:00
|
|
|
%postun devel
|
|
|
|
ghc-pkg recache
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
%postun doc
|
|
|
|
if [ "$1" -eq 0 ] ; then
|
|
|
|
%ghc_reindex_haddock
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2009-12-25 15:56:06 +00:00
|
|
|
%if %{with shared}
|
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_docdir}/%{name}-%{version}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2009-09-14 03:15:21 +00:00
|
|
|
%files devel -f %{name}-devel.files
|
|
|
|
%defattr(-,root,root,-)
|
2009-12-25 15:56:06 +00:00
|
|
|
%if %{without shared}
|
2009-09-14 03:15:21 +00:00
|
|
|
%{_docdir}/%{name}-%{version}
|
2009-12-25 15:56:06 +00:00
|
|
|
%endif
|
2009-09-14 03:15:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
%files doc -f %{name}-doc.files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with prof}
|
|
|
|
%files prof -f %{name}-prof.files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2009-12-25 15:56:06 +00:00
|
|
|
* Sat Dec 26 2009 Jens Petersen <petersen@redhat.com> - 5.4.2.2-2
|
|
|
|
- update for ghc-6.12.1: add shared library support
|
|
|
|
- use new ghc*_requires macros: needs ghc-rpm-macros 0.4.0
|
|
|
|
- add common_summary and common_description
|
|
|
|
|
2009-09-14 03:15:21 +00:00
|
|
|
* Wed Aug 12 2009 Bryan O'Sullivan <bos@serpentine.com> - 5.4.2.2-1
|
|
|
|
- initial packaging for Fedora created by cabal2spec
|