|
|
|
@ -1,6 +1,18 @@
|
|
|
|
|
# test builds can made faster by disabling profiled libraries
|
|
|
|
|
# test builds can made faster and smaller by disabling profiled libraries
|
|
|
|
|
# (currently libHSrts_thr_p.a breaks no prof build)
|
|
|
|
|
%bcond_without prof
|
|
|
|
|
%bcond_without doc
|
|
|
|
|
# build users_guide, etc
|
|
|
|
|
%bcond_without manual
|
|
|
|
|
# include extralibs
|
|
|
|
|
%bcond_without extralibs
|
|
|
|
|
|
|
|
|
|
# experimental
|
|
|
|
|
## shared libraries support available in ghc >= 6.11
|
|
|
|
|
%bcond_with shared
|
|
|
|
|
## include colored html src
|
|
|
|
|
%bcond_with hscolour
|
|
|
|
|
|
|
|
|
|
%global haddock_version 2.4.2
|
|
|
|
|
|
|
|
|
|
# Fixing packaging problems can be a tremendous pain because it
|
|
|
|
|
# generally requires a complete rebuild, which takes hours. To offset
|
|
|
|
@ -15,29 +27,38 @@
|
|
|
|
|
%global package_debugging 0
|
|
|
|
|
|
|
|
|
|
Name: ghc
|
|
|
|
|
Version: 6.10.2
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
# part of haskell-platform-2009.2.0.1
|
|
|
|
|
Version: 6.10.3
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Summary: Glasgow Haskell Compilation system
|
|
|
|
|
# fedora ghc has only been bootstrapped on the following archs:
|
|
|
|
|
ExclusiveArch: %{ix86} x86_64 ppc alpha
|
|
|
|
|
License: BSD
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
|
|
|
|
|
%if %{with extralibs}
|
|
|
|
|
Source1: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src-extralibs.tar.bz2
|
|
|
|
|
Source2: ghc-rpm-macros.ghc
|
|
|
|
|
%endif
|
|
|
|
|
URL: http://haskell.org/ghc/
|
|
|
|
|
# libedit-devel > 2.11-2 correctly requires ncurses-devel
|
|
|
|
|
Requires: gcc, gmp-devel, libedit-devel > 2.11-2
|
|
|
|
|
Requires: gcc, gmp-devel
|
|
|
|
|
Requires(post): policycoreutils
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
Obsoletes: ghc682, ghc681, ghc661, ghc66, haddock <= 2.0.0.0, haddock09
|
|
|
|
|
# introduced for f11 and to be removed for f13:
|
|
|
|
|
Provides: haddock = 2.3.0
|
|
|
|
|
Obsoletes: ghc682, ghc681, ghc661, ghc66, haddock09
|
|
|
|
|
# introduced for f11 and can be removed for f13:
|
|
|
|
|
Obsoletes: haddock < %{haddock_version}, ghc-haddock-devel < %{haddock_version}
|
|
|
|
|
Provides: haddock = %{haddock_version}, ghc-haddock-devel = %{haddock_version}
|
|
|
|
|
BuildRequires: ghc, happy, sed
|
|
|
|
|
BuildRequires: gmp-devel, libedit-devel > 2.11-2
|
|
|
|
|
%if %{with doc}
|
|
|
|
|
BuildRequires: gmp-devel
|
|
|
|
|
%if %{with shared}
|
|
|
|
|
# not sure if this is actually needed
|
|
|
|
|
BuildRequires: libffi-devel
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with manual}
|
|
|
|
|
BuildRequires: libxslt, docbook-style-xsl
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with hscolour}
|
|
|
|
|
BuildRequires: hscolour
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
GHC is a state-of-the-art programming suite for Haskell, a purely
|
|
|
|
@ -49,12 +70,39 @@ collection of libraries, and support for various language
|
|
|
|
|
extensions, including concurrency, exceptions, and a foreign language
|
|
|
|
|
interface.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for GHC
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
# for haddock
|
|
|
|
|
Requires(posttrans): %{name} = %{version}-%{release}
|
|
|
|
|
Obsoletes: ghc-haddock-doc < %{haddock_version}
|
|
|
|
|
Provides: ghc-haddock-doc = %{haddock_version}
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
Preformatted documentation for the Glorious Glasgow Haskell
|
|
|
|
|
Compilation System (GHC) and its libraries. It should be installed if
|
|
|
|
|
you like to have local access to the documentation in HTML format.
|
|
|
|
|
|
|
|
|
|
%if %{with shared}
|
|
|
|
|
%package libs
|
|
|
|
|
Summary: Shared libraries for GHC
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description libs
|
|
|
|
|
Shared libraries for Glorious Glasgow Haskell Compilation System
|
|
|
|
|
(GHC). They should be installed to build standalone programs.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with prof}
|
|
|
|
|
%package prof
|
|
|
|
|
Summary: Profiling libraries for GHC
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
Obsoletes: ghc682-prof, ghc681-prof, ghc661-prof, ghc66-prof
|
|
|
|
|
Obsoletes: ghc-haddock-prof < %{haddock_version}
|
|
|
|
|
Provides: ghc-haddock-prof = %{haddock_version}
|
|
|
|
|
|
|
|
|
|
%description prof
|
|
|
|
|
Profiling libraries for Glorious Glasgow Haskell Compilation System
|
|
|
|
@ -62,23 +110,11 @@ Profiling libraries for Glorious Glasgow Haskell Compilation System
|
|
|
|
|
needed.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for GHC
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
# for haddock
|
|
|
|
|
Requires(posttrans): %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
Preformatted documentation for the Glorious Glasgow Haskell
|
|
|
|
|
Compilation System (GHC) and its libraries. It should be installed if
|
|
|
|
|
you like to have local access to the documentation in HTML format.
|
|
|
|
|
|
|
|
|
|
# the debuginfo subpackage is currently empty anyway, so don't generate it
|
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{name}-%{version} -b1
|
|
|
|
|
%setup -q -n %{name}-%{version} %{?with_extralibs:-b1}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# hack for building a local test package quickly from a prebuilt tree
|
|
|
|
@ -90,26 +126,24 @@ popd
|
|
|
|
|
exit 0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if !%{with prof}
|
|
|
|
|
echo "GhcLibWays=" >> mk/build.mk
|
|
|
|
|
echo "GhcRTSWays=thr debug" >> mk/build.mk
|
|
|
|
|
%if %{without prof}
|
|
|
|
|
echo "GhcLibWays=%{?with_shared:dyn}" >> mk/build.mk
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
|
%if %{with manual}
|
|
|
|
|
echo "XMLDocWays = html" >> mk/build.mk
|
|
|
|
|
echo "HADDOCK_DOCS = YES" >> mk/build.mk
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
|
|
|
|
|
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
|
|
|
|
|
--datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} \
|
|
|
|
|
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
|
|
|
|
|
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir}
|
|
|
|
|
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
|
|
|
|
|
%{?with_shared:--enable-shared}
|
|
|
|
|
|
|
|
|
|
make %{_smp_mflags}
|
|
|
|
|
make %{_smp_mflags} -C libraries
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
|
%if %{with manual}
|
|
|
|
|
make %{_smp_mflags} html
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -118,28 +152,26 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
make DESTDIR=${RPM_BUILD_ROOT} install
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
|
%if %{with manual}
|
|
|
|
|
make DESTDIR=${RPM_BUILD_ROOT} install-docs
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# install rpm macros
|
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm
|
|
|
|
|
cp -p %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc
|
|
|
|
|
%if %{with shared}
|
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/ld.so.conf.d
|
|
|
|
|
echo %{_libdir}/%{name}-%{version} > ${RPM_BUILD_ROOT}/%{_sysconfdir}/ld.so.conf.d/ghc-%{_arch}.conf
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
SRC_TOP=$PWD
|
|
|
|
|
rm -f rpm-*-filelist rpm-*.files
|
|
|
|
|
rm -f rpm-*.files
|
|
|
|
|
( cd $RPM_BUILD_ROOT
|
|
|
|
|
find .%{_libdir}/%{name}-%{version} \( -type d -fprintf $SRC_TOP/rpm-dir.files "%%%%dir %%p\n" \) -o \( -type f \( -name '*.p_hi' -o -name '*_p.a' \) -fprint $SRC_TOP/rpm-prof.files \) -o \( -not -name 'package.conf*' -fprint $SRC_TOP/rpm-lib.files \)
|
|
|
|
|
find .%{_docdir}/%{name}/* -type d ! -name libraries > $SRC_TOP/rpm-doc-dir.files
|
|
|
|
|
find .%{_docdir}/%{name}/* -type d ! -name libraries ! -name src > $SRC_TOP/rpm-doc-dir.files
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# make paths absolute (filter "./usr" to "/usr")
|
|
|
|
|
sed -i -e "s|\.%{_prefix}|%{_prefix}|" rpm-*.files
|
|
|
|
|
|
|
|
|
|
cat rpm-dir.files rpm-lib.files > rpm-base-filelist
|
|
|
|
|
%if %{with prof}
|
|
|
|
|
cat rpm-prof.files > rpm-prof-filelist
|
|
|
|
|
%endif
|
|
|
|
|
cat rpm-dir.files rpm-lib.files > rpm-base.files
|
|
|
|
|
|
|
|
|
|
# these are handled as alternatives
|
|
|
|
|
for i in hsc2hs runhaskell; do
|
|
|
|
@ -150,6 +182,20 @@ for i in hsc2hs runhaskell; do
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# stolen from ghc6/debian/rules:
|
|
|
|
|
# Do some very simple tests that the compiler actually works
|
|
|
|
|
rm -rf testghc
|
|
|
|
|
mkdir testghc
|
|
|
|
|
echo 'main = putStrLn "Foo"' > testghc/foo.hs
|
|
|
|
|
ghc/stage2-inplace/ghc testghc/foo.hs -o testghc/foo
|
|
|
|
|
[ "$(testghc/foo)" = "Foo" ]
|
|
|
|
|
rm testghc/*
|
|
|
|
|
echo 'main = putStrLn "Foo"' > testghc/foo.hs
|
|
|
|
|
ghc/stage2-inplace/ghc testghc/foo.hs -o testghc/foo -O2
|
|
|
|
|
[ "$(testghc/foo)" = "Foo" ]
|
|
|
|
|
rm testghc/*
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
@ -174,9 +220,9 @@ update-alternatives --install %{_bindir}/runhaskell runhaskell \
|
|
|
|
|
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
|
|
|
|
|
%{_bindir}/hsc2hs-ghc 500
|
|
|
|
|
|
|
|
|
|
# posttrans to make sure any old documentation has been removed first
|
|
|
|
|
%posttrans doc
|
|
|
|
|
( cd %{_docdir}/ghc/libraries && ./gen_contents_index ) || :
|
|
|
|
|
%if %{with shared}
|
|
|
|
|
%post libs -p /sbin/ldconfig
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
if [ "$1" = 0 ]; then
|
|
|
|
@ -184,25 +230,30 @@ if [ "$1" = 0 ]; then
|
|
|
|
|
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%files -f rpm-base-filelist
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc ANNOUNCE HACKING LICENSE README
|
|
|
|
|
%doc %{_mandir}/man1/ghc.*
|
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%{_sysconfdir}/rpm/macros.ghc
|
|
|
|
|
%config(noreplace) %{_libdir}/ghc-%{version}/package.conf
|
|
|
|
|
|
|
|
|
|
%if %{with prof}
|
|
|
|
|
%files prof -f rpm-prof-filelist
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%if %{with shared}
|
|
|
|
|
%postun libs -p /sbin/ldconfig
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
|
%posttrans doc
|
|
|
|
|
# (posttrans to make sure any old documentation has been removed first)
|
|
|
|
|
( cd %{_docdir}/ghc/libraries && ./gen_contents_index ) || :
|
|
|
|
|
|
|
|
|
|
%files -f rpm-base.files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc ANNOUNCE HACKING LICENSE README
|
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%if %{with manual}
|
|
|
|
|
%{_mandir}/man1/ghc.*
|
|
|
|
|
%endif
|
|
|
|
|
%config(noreplace) %{_libdir}/ghc-%{version}/package.conf
|
|
|
|
|
|
|
|
|
|
%files doc -f rpm-doc-dir.files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%dir %{_docdir}/%{name}
|
|
|
|
|
%{_docdir}/%{name}/LICENSE
|
|
|
|
|
%if %{with manual}
|
|
|
|
|
%{_docdir}/%{name}/index.html
|
|
|
|
|
%endif
|
|
|
|
|
%{_docdir}/%{name}/libraries/gen_contents_index
|
|
|
|
|
%{_docdir}/%{name}/libraries/prologue.txt
|
|
|
|
|
%dir %{_docdir}/%{name}/libraries
|
|
|
|
@ -213,9 +264,60 @@ fi
|
|
|
|
|
%ghost %{_docdir}/%{name}/libraries/index.html
|
|
|
|
|
%ghost %{_docdir}/%{name}/libraries/minus.gif
|
|
|
|
|
%ghost %{_docdir}/%{name}/libraries/plus.gif
|
|
|
|
|
|
|
|
|
|
%if %{with shared}
|
|
|
|
|
%files libs
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%{_sysconfdir}/ld.so.conf.d/ghc-%{_arch}.conf
|
|
|
|
|
%{_libdir}/libHS*-ghc%{version}.so
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with prof}
|
|
|
|
|
%files prof -f rpm-prof.files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sat May 30 2009 Jens Petersen <petersen@redhat.com> - 6.10.3-3
|
|
|
|
|
- add haddock_version and use it to obsolete haddock and ghc-haddock-*
|
|
|
|
|
|
|
|
|
|
* Fri May 22 2009 Jens Petersen <petersen@redhat.com> - 6.10.3-2
|
|
|
|
|
- update haddock provides and obsoletes
|
|
|
|
|
- drop ghc-mk-pkg-install-inplace.patch: no longer needed with new 6.11 buildsys
|
|
|
|
|
- add bcond for extralibs
|
|
|
|
|
- rename doc bcond to manual
|
|
|
|
|
|
|
|
|
|
* Wed May 13 2009 Jens Petersen <petersen@redhat.com> - 6.10.3-1
|
|
|
|
|
- update to 6.10.3
|
|
|
|
|
- haskline replaces editline, so it is no longer needed to build
|
|
|
|
|
- macros.ghc moved to ghc-rpm-macros package
|
|
|
|
|
- fix handling of hscolor files in filelist generation
|
|
|
|
|
|
|
|
|
|
* Tue Apr 28 2009 Jens Petersen <petersen@redhat.com> - 6.10.2-4
|
|
|
|
|
- add experimental bcond hscolour
|
|
|
|
|
- add experimental support for building shared libraries (for ghc-6.11)
|
|
|
|
|
- add libs subpackage for shared libraries
|
|
|
|
|
- create a ld.conf.d file for libghc*.so
|
|
|
|
|
- BR libffi-devel
|
|
|
|
|
- drop redundant setting of GhcLibWays in build.mk for no prof
|
|
|
|
|
- drop redundant setting of HADDOCK_DOCS
|
|
|
|
|
- simplify filelist names
|
|
|
|
|
- add a check section based on tests from debian's package
|
|
|
|
|
- be more careful about doc files in filelist
|
|
|
|
|
|
|
|
|
|
* Fri Apr 24 2009 Jens Petersen <petersen@redhat.com> - 6.10.2-3
|
|
|
|
|
- define ghc_version in macros.ghc in place of ghcrequires
|
|
|
|
|
- drop ghc-requires script for now
|
|
|
|
|
|
|
|
|
|
* Sun Apr 19 2009 Jens Petersen <petersen@redhat.com> - 6.10.2-2
|
|
|
|
|
- add ghc-requires rpm script to generate ghc version dependencies
|
|
|
|
|
(thanks to Till Maas)
|
|
|
|
|
- update macros.ghc:
|
|
|
|
|
- add %%ghcrequires to call above script
|
|
|
|
|
- pkg_libdir and pkg_docdir obsoleted in packages and replaced
|
|
|
|
|
by ghcpkgdir and ghcdocdir inside macros.ghc
|
|
|
|
|
- make filelist also for docs
|
|
|
|
|
|
|
|
|
|
* Wed Apr 08 2009 Bryan O'Sullivan <bos@serpentine.com> - 6.10.2-1
|
|
|
|
|
- Update to 6.10.2
|
|
|
|
|
|
|
|
|
|