Compare commits

...

7 Commits
master ... f11

Author SHA1 Message Date
Fedora Release Engineering feac2e207f dist-git conversion 2010-07-28 15:33:52 +00:00
Bill Nottingham 818a619279 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:55:57 +00:00
Jens Petersen 0cc055db3f version haskell-platform note 2009-09-28 05:39:08 +00:00
Jens Petersen f572f2f68f add haddock_version and use it to obsolete haddock and ghc-haddock-* 2009-05-31 23:45:58 +00:00
Jens Petersen e2e409b4c6 backport ghc-6.10.3 to f11 from devel 2009-05-28 00:18:17 +00:00
Jens Petersen 2cbaf8d9cd Backport latest ghc from devel:
Sat May 2 2009 Jens Petersen <petersen@redhat.com> - 6.10.2-5
- try unregisterised ppc to see if that stops the segfaulting with runghc
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
Sun Apr 19 2009 Jens Petersen <petersen@redhat.com> - 6.10.2-2
- update macros.ghc:
- pkg_libdir and pkg_docdir obsoleted in packages and replaced by ghcpkgdir
    and ghcdocdir inside macros.ghc
- make filelist also for docs
2009-05-02 12:09:58 +00:00
Jesse Keating 73b50589d9 Initialize branch F-11 for ghc 2009-04-15 06:34:41 +00:00
6 changed files with 164 additions and 114 deletions

View File

@ -1,2 +0,0 @@
ghc-6.10.2-src.tar.bz2
ghc-6.10.2-src-extralibs.tar.bz2

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
ghc-6.10.3-src.tar.bz2
ghc-6.10.3-src-extralibs.tar.bz2

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: ghc
# $Id$
NAME := ghc
SPECFILE = $(NAME).spec
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1,31 +0,0 @@
%cabal %{_bindir}/runghc Setup
%cabal_configure \
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{pkg_docdir} --libsubdir='$compiler/$pkgid'
%cabal_makefile \
%cabal makefile -f cabal-rpm.mk \
make -f cabal-rpm.mk %{_smp_mflags} \
%{nil}
%cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v
%ghc_gen_filelists() \
rm -f %1-devel.files %1-prof.files \
echo '%defattr(-,root,root,-)' > %1-devel.files \
find ${RPM_BUILD_ROOT}%{pkg_libdir} -type d | sed 's/^/%dir /' >> %1-devel.files \
find ${RPM_BUILD_ROOT}%{pkg_libdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1-devel.files \
echo '%defattr(-,root,root,-)' > %1-prof.files \
find ${RPM_BUILD_ROOT}%{pkg_libdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \
sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1-devel.files %1-prof.files \
%{nil}
%ghc_gen_scripts %cabal register --gen-script ; %cabal unregister --gen-script
%ghc_install_scripts install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{pkg_libdir}
%ghc_register_pkg %{pkg_libdir}/register.sh >/dev/null || :
%ghc_unregister_pkg %{pkg_libdir}/unregister.sh >/dev/null || :
%ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || :

218
ghc.spec
View File

@ -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

View File

@ -1,2 +1,2 @@
243d5857e5aa5f2f86e5e4c4437973fb ghc-6.10.2-src.tar.bz2
9415604386ca69ebe15f1054653aefaf ghc-6.10.2-src-extralibs.tar.bz2
3de6a6d434c2b43def10c4cc613b265e ghc-6.10.3-src.tar.bz2
d0fe09625556ea274df11d601c1b2a15 ghc-6.10.3-src-extralibs.tar.bz2