Compare commits

...

10 Commits
master ... f9

Author SHA1 Message Date
Fedora Release Engineering 5085ad5a33 dist-git conversion 2010-07-28 15:33:48 +00:00
Bill Nottingham bfa0e43cb5 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:55:57 +00:00
Oliver Falk a5bfb20acb Reenable build on alpha, after we finally managed to build ghc 2009-02-26 09:34:42 +00:00
Jens Petersen d8a1d24ab2 backport latest macros.ghc:
Mon Dec 1 2008 Jens Petersen <petersen@redhat.com>
- update macros.ghc to latest proposed revised packaging guidelines:
- use runghc
- drop trivial cabal_build and cabal_haddock macros
- ghc_register_pkg and ghc_unregister_pkg replace ghc_preinst_script,
    ghc_postinst_script, ghc_preun_script, and ghc_postun_script
- ghc-prof does not need to own libraries dirs owned by main package
2009-02-13 00:59:15 +00:00
Jens Petersen 406da0770b add patch for ghc683 2008-11-03 07:15:50 +00:00
Jens Petersen 1c882e4d3f backport f10 ghc to f9 and add a dummy ghc682-prof package
This now provides the new rpm macros.ghc for the Haskell Packaging
    Guidelines for F9.
2008-11-03 07:11:45 +00:00
Bryan O'Sullivan bba6ab2c38 Backport macros 2008-10-15 03:51:42 +00:00
Jens Petersen d877e91d6c remove network/include/Typeable.h again 2008-10-14 02:05:29 +00:00
Jens Petersen 84d437aba6 - add macros.ghc for new Haskell Packaging Guidelines (#460304)
- add selinux file context for unconfined_execmem following darcs package
- generate docs following upstream's instructions, now under docdir/ghc
- setup docs building in build.mk
- drop requires chkconfig
- do not override __spec_install_post
- no longer need to remove network/include/Typeable.h
- remove runhaskell since it is an alternative
2008-10-14 01:45:10 +00:00
Jesse Keating 26eb1949c0 Initialize branch F-9 for ghc 2008-04-20 19:25:25 +00:00
7 changed files with 196 additions and 106 deletions

View File

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

2
.gitignore vendored Normal file
View File

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

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: ghc
# $Id$
NAME := ghc
SPECFILE = $(firstword $(wildcard *.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

@ -0,0 +1,22 @@
--- ghc-6.8.3/libraries/Makefile~ 2008-06-17 23:10:28.000000000 -0700
+++ ghc-6.8.3/libraries/Makefile 2008-06-17 23:21:21.000000000 -0700
@@ -256,6 +256,8 @@
--with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace \
--with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace \
--with-ld=$(LD) \
+ --with-haddock=$(HADDOCK) \
+ --with-happy=$(HAPPY) \
--haddock-options="--use-contents=../index.html \
--use-index=../doc-index.html" \
$(FLAGGED_CONFIGURE_ARGS) \
--- ghc-6.8.3/libraries/gen_contents_index~ 2008-06-18 20:40:39.000000000 -0700
+++ ghc-6.8.3/libraries/gen_contents_index 2008-06-18 20:40:50.000000000 -0700
@@ -22,7 +22,7 @@
done
# Now create the combined contents and index pages
-haddock --gen-index --gen-contents -o . \
+haddock-0.9 --gen-index --gen-contents -o . \
-t "Haskell Hierarchical Libraries" \
$HADDOCK_ARGS

31
ghc-rpm-macros.ghc Normal file
View File

@ -0,0 +1,31 @@
%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.files %1-prof.files \
echo '%defattr(-,root,root,-)' > %1.files \
find ${RPM_BUILD_ROOT}%{pkg_libdir} -type d | sed 's/^/%dir /' >> %1.files \
find ${RPM_BUILD_ROOT}%{pkg_libdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1.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.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 ) || :

220
ghc.spec
View File

@ -1,5 +1,3 @@
%define ghcver ghc682
# speed up test builds by not building profiled libraries
%define build_prof 1
%define build_doc 1
@ -17,26 +15,28 @@
%define package_debugging 0
Name: ghc
Version: 6.8.2
Release: 10%{?dist}
Version: 6.8.3
Release: 11%{?dist}
Summary: Glasgow Haskell Compilation system
# See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239713
ExcludeArch: alpha ppc64
ExcludeArch: ppc64
License: BSD
Group: Development/Languages
Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
Source1: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src-extralibs.tar.bz2
Source2: ghc-rpm-macros.ghc
Patch0: ghc-6.8.3-libraries-config.patch
URL: http://haskell.org/ghc/
Requires: %{ghcver} = %{version}-%{release}, chkconfig
Requires: gcc, gmp-devel, readline-devel
Requires(post): policycoreutils
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: ghc682, ghc681, ghc661, ghc66
BuildRequires: ghc, happy, sed
BuildRequires: gmp-devel, readline-devel
# X11 is no longer in ghc extralibs
#BuildRequires: libX11-devel, libXt-devel
BuildRequires: freeglut-devel, openal-devel
%if %{build_doc}
# haddock generates docs in libraries
BuildRequires: libxslt, docbook-style-xsl, haddock >= 0.8
# haddock generates docs in libraries, but haddock 2.0 is not compatible
BuildRequires: libxslt, docbook-style-xsl, haddock09
%endif
%description
@ -49,40 +49,32 @@ collection of libraries, and support for various language
extensions, including concurrency, exceptions, and a foreign language
interface.
%package -n %{ghcver}
Summary: Glasgow Haskell Compilation system
Group: Development/Languages
Requires: gcc gmp-devel readline-devel
%description -n %{ghcver}
GHC is a state-of-the-art programming suite for Haskell, a purely
functional programming language. It includes an optimising compiler
generating good code for a variety of platforms, together with an
interactive system for convenient, quick development. The
distribution includes space and time profiling facilities, a large
collection of libraries, and support for various language
extensions, including concurrency, exceptions, and a foreign language
interfaces.
This package contains all the main files and libraries of version %{version}.
%if %{build_prof}
%package -n %{ghcver}-prof
%package prof
Summary: Profiling libraries for GHC
Group: Development/Libraries
Requires: %{ghcver} = %{version}-%{release}
Obsoletes: ghc-prof
Requires: %{name} = %{version}-%{release}
Obsoletes: ghc682-prof, ghc681-prof, ghc661-prof, ghc66-prof
%description -n %{ghcver}-prof
%description prof
Profiling libraries for Glorious Glasgow Haskell Compilation System
(GHC). They should be installed when GHC's profiling subsystem is
needed.
# this is a workaround for bug#467893 (ghc-prof and ghc682-prof obsoleting each other)
%package -n ghc682-prof
Summary: ghc682-prof dummy package
Group: Development/Libraries
%description -n ghc682-prof
This is a dummy package to workaround bug#467893.
%endif
%package doc
Summary: Documentation for GHC
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
Requires(post): haddock09
%description doc
Preformatted documentation for the Glorious Glasgow Haskell
@ -91,17 +83,18 @@ you like to have local access to the documentation in HTML format.
# the debuginfo subpackage is currently empty anyway, so don't generate it
%define debug_package %{nil}
%define __spec_install_post /usr/lib/rpm/brp-compress
%prep
%setup -q -n %{name}-%{version} -b1
%patch0 -p1 -b .0-haddock~
%build
# hack for building a local test package quickly from a prebuilt tree
%if %{package_debugging}
cd ..
pushd ..
rm -rf %{name}-%{version}
cp -al %{name}-%{version}.built %{name}-%{version}
cd %{name}-%{version}
popd
exit 0
%endif
@ -110,48 +103,44 @@ echo "GhcLibWays=" >> mk/build.mk
echo "GhcRTSWays=thr debug" >> mk/build.mk
%endif
%if %{build_doc}
echo "XMLDocWays = html" >> mk/build.mk
echo "HADDOCK_DOCS = YES" >> mk/build.mk
%endif
export HaddockCmd=%{_bindir}/haddock-0.9
./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}
cat <<HADDOCK_PATH_HACK >> mk/build.mk
docdir := %{_docdir}/%{name}-%{version}
htmldir := $(docdir)
dvidir := $(docdir)
pdfdir := $(docdir)
psdir := $(docdir)
HADDOCK_PATH_HACK
make %{_smp_mflags}
make %{_smp_mflags} -C libraries
# drop truncated copy of header (#222865)
rm libraries/network/include/Typeable.h
make %{_smp_mflags} all
%if %{build_doc}
make %{_smp_mflags} html
make %{_smp_mflags} -C libraries HADDOCK_DOCS=YES
( cd libraries/Cabal && docbook2html doc/Cabal.xml --output doc/Cabal )
%endif
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir}/%{name}-%{version} install
make DESTDIR=${RPM_BUILD_ROOT} install
%if %{build_doc}
make DESTDIR=${RPM_BUILD_ROOT} XMLDocWays="html" HADDOCK_DOCS=YES install-docs
if [ -d ${RPM_BUILD_ROOT}/%{_docdir}/%{name}/libraries ]; then
mv ${RPM_BUILD_ROOT}/%{_docdir}/%{name}/libraries \
${RPM_BUILD_ROOT}/%{_docdir}/%{name}-%{version}
fi
cp libraries/*.html ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-%{version}/libraries
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
SRC_TOP=$PWD
rm -f rpm-*-filelist 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 .%{_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
)
# make paths absolute (filter "./usr" to "/usr")
@ -159,20 +148,24 @@ sed -i -e "s|\.%{_prefix}|%{_prefix}|" rpm-*.files
cat rpm-dir.files rpm-lib.files > rpm-base-filelist
%if %{build_prof}
cat rpm-dir.files rpm-prof.files > rpm-prof-filelist
cat rpm-prof.files > rpm-prof-filelist
%endif
# create package.conf.old
touch $RPM_BUILD_ROOT%{_libdir}/ghc-%{version}/package.conf.old
mv ${RPM_BUILD_ROOT}%{_bindir}/hsc2hs ${RPM_BUILD_ROOT}%{_bindir}/hsc2hs-ghc
# these are handled as alternatives
for i in hsc2hs runhaskell; do
if [ -x ${RPM_BUILD_ROOT}%{_bindir}/$i-ghc ]; then
rm ${RPM_BUILD_ROOT}%{_bindir}/$i
else
mv ${RPM_BUILD_ROOT}%{_bindir}/$i{,-ghc}
fi
done
%clean
rm -rf $RPM_BUILD_ROOT
%post
/usr/bin/chcon -t unconfined_execmem_exec_t %{_bindir}/{hasktags,runghc,runhaskell} >/dev/null 2>&1 || :
semanage fcontext -a -t unconfined_execmem_exec_t %{_libdir}/ghc-%{version}/{ghc-%{version},ghc-pkg.bin,hsc2hs-bin} >/dev/null 2>&1 || :
restorecon %{_libdir}/ghc-%{version}/{ghc-%{version},ghc-pkg.bin,hsc2hs-bin}
# Alas, GHC, Hugs, and nhc all come with different set of tools in
# addition to a runFOO:
@ -191,46 +184,111 @@ update-alternatives --install %{_bindir}/runhaskell runhaskell \
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
%{_bindir}/hsc2hs-ghc 500
%post -n %{ghcver}
/usr/bin/chcon -t unconfined_execmem_exec_t %{_libdir}/ghc-%{version}/{ghc-%{version},ghc-pkg.bin,hsc2hs-bin} >/dev/null 2>&1 || :
%post doc
( cd %{_docdir}/ghc/libraries && ./gen_contents_index ) || :
%preun
if test "$1" = 0; then
if [ "$1" = 0 ]; then
update-alternatives --remove runhaskell %{_bindir}/runghc
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
fi
%files
%defattr(-,root,root,-)
%{_bindir}/*
%exclude %{_bindir}/ghc*%{version}
%doc %{_mandir}/man1/ghc.*
%files -n %{ghcver} -f rpm-base-filelist
%files -f rpm-base-filelist
%defattr(-,root,root,-)
%doc ANNOUNCE HACKING LICENSE README
%{_bindir}/ghc*%{version}
%doc %{_mandir}/man1/ghc.*
%{_bindir}/*
%{_sysconfdir}/rpm/macros.ghc
%config(noreplace) %{_libdir}/ghc-%{version}/package.conf
%ghost %{_libdir}/ghc-%{version}/package.conf.old
%if %{build_prof}
%files -n %{ghcver}-prof -f rpm-prof-filelist
%files prof -f rpm-prof-filelist
%defattr(-,root,root,-)
%files -n ghc682-prof
%defattr(-,root,root,-)
%endif
%if %{build_doc}
%files doc
%files doc -f rpm-doc-dir.files
%defattr(-,root,root,-)
%{_docdir}/%{name}-%{version}
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/index.html
%{_docdir}/%{name}/libraries/gen_contents_index
%dir %{_docdir}/%{name}/libraries
%ghost %{_docdir}/%{name}/libraries/doc-index.html
%ghost %{_docdir}/%{name}/libraries/haddock.css
%ghost %{_docdir}/%{name}/libraries/haddock-util.js
%ghost %{_docdir}/%{name}/libraries/haskell_icon.gif
%ghost %{_docdir}/%{name}/libraries/index.html
%ghost %{_docdir}/%{name}/libraries/minus.gif
%ghost %{_docdir}/%{name}/libraries/plus.gif
%endif
%changelog
* Fri Feb 13 2009 Jens Petersen <petersen@redhat.com> - 6.8.3-11
- backport latest macros.ghc:
* Mon Dec 1 2008 Jens Petersen <petersen@redhat.com>
- update macros.ghc to latest proposed revised packaging guidelines:
- use runghc
- drop trivial cabal_build and cabal_haddock macros
- ghc_register_pkg and ghc_unregister_pkg replace ghc_preinst_script,
ghc_postinst_script, ghc_preun_script, and ghc_postun_script
- ghc-prof does not need to own libraries dirs owned by main package
* Thu Oct 23 2008 Jens Petersen <petersen@redhat.com> - 6.8.3-10.fc9
- remove redundant --haddockdir (interfacedir in Cabal-1.2) from cabal_configure
- add a ghc682-prof dummy package to stop ghc-prof and ghc682-prof obsoleting
each other (reported by thingwath, #467893)
* Thu Oct 23 2008 Jens Petersen <petersen@redhat.com> - 6.8.3-9
- use gen_contents_index to re-index haddock
- add %%pkg_docdir to cabal_configure
- requires(post) haddock09 for doc
- improve doc file lists
- no longer need to create ghost package.conf.old
- remove or rename alternatives files more consistently
* Tue Oct 14 2008 Bryan O'Sullivan <bos@serpentine.com> 6.8.3-8
- Regenerate the haddock doc index automatically
- Update macros to fit in with this scheme
* Mon Oct 13 2008 Jens Petersen <petersen@redhat.com> - 6.8.3-7
- add selinux file context for unconfined_execmem following darcs package
* Wed Oct 1 2008 Bryan O'Sullivan <bos@serpentine.com> 6.8.3-6
* Rename hsc2hs to hsc2hs-ghc so the alternatives symlink to it will work
* Wed Sep 24 2008 Jens Petersen <petersen@redhat.com> - 6.8.3-5
- bring back including haddock-generated lib docs, now under docdir/ghc
- fix macros.ghc filepath (#460304)
- spec file cleanups:
- fix the source urls back
- drop requires chkconfig
- do not override __spec_install_post
- setup docs building in build.mk
- no longer need to remove network/include/Typeable.h
- install binaries under libdir not libexec
- remove hsc2hs and runhaskell binaries since they are alternatives
* Wed Sep 17 2008 Jens Petersen <petersen@redhat.com> - 6.8.3-4
- add macros.ghc for new Haskell Packaging Guidelines (#460304)
* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 6.8.3-3
- Add symlinks from _libdir, where ghc looks, to _libexecdir
- Patch libraries/gen_contents_index to use haddock-0.9
* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 6.8.3-2
- Remove unnecessary dependency on alex
* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 6.8.3-1
- Upgrade to 6.8.3
- Drop the ghc682-style naming scheme, obsolete those packages
- Manually strip binaries
* Tue Apr 8 2008 Jens Petersen <petersen@redhat.com> - 6.8.2-10
- another rebuild attempt

View File

@ -1,2 +1,2 @@
43108417594be7eba0918c459e871e40 ghc-6.8.2-src.tar.bz2
d199c50814188fb77355d41058b8613c ghc-6.8.2-src-extralibs.tar.bz2
5ac72f5d5433151cf6b718dc6601dc41 ghc-6.8.3-src-extralibs.tar.bz2
dfa31028b4d06d1d226f55fe3a2ab7b3 ghc-6.8.3-src.tar.bz2