From 92410e9528ac47ac6571eb70e676b0025b5caccc Mon Sep 17 00:00:00 2001 From: Bryan O'Sullivan Date: Wed, 18 Jun 2008 16:44:34 +0000 Subject: [PATCH] First cut at ghc 6.8.3 spec file --- .cvsignore | 4 ++-- ghc-6.8.3-libraries-config.patch | 12 ++++++++++ ghc.spec | 40 +++++++++++++++----------------- sources | 4 ++-- 4 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 ghc-6.8.3-libraries-config.patch diff --git a/.cvsignore b/.cvsignore index c789583..245433c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -ghc-6.8.2.20080527-src-extralibs.tar.bz2 -ghc-6.8.2.20080527-src.tar.bz2 +ghc-6.8.3-src-extralibs.tar.bz2 +ghc-6.8.3-src.tar.bz2 diff --git a/ghc-6.8.3-libraries-config.patch b/ghc-6.8.3-libraries-config.patch new file mode 100644 index 0000000..f9e395a --- /dev/null +++ b/ghc-6.8.3-libraries-config.patch @@ -0,0 +1,12 @@ +--- 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,9 @@ + --with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace \ + --with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace \ + --with-ld=$(LD) \ ++ --with-alex=$(ALEX) \ ++ --with-haddock=$(HADDOCK) \ ++ --with-happy=$(HAPPY) \ + --haddock-options="--use-contents=../index.html \ + --use-index=../doc-index.html" \ + $(FLAGGED_CONFIGURE_ARGS) \ diff --git a/ghc.spec b/ghc.spec index b1a514f..71fb15f 100644 --- a/ghc.spec +++ b/ghc.spec @@ -1,4 +1,4 @@ -%define ghcver ghc682 +%define ghcver ghc683 # speed up test builds by not building profiled libraries %define build_prof 1 @@ -17,15 +17,16 @@ %define package_debugging 0 Name: ghc -Version: 6.8.2 -Release: 10%{?dist} +Version: 6.8.3 +Release: 1%{?dist} Summary: Glasgow Haskell Compilation system # See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239713 ExcludeArch: alpha 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 +Source0: http://www.haskell.org/ghc/dist/stable/dist/ghc-%{version}-src.tar.bz2 +Source1: http://www.haskell.org/ghc/dist/stable/dist/ghc-%{version}-src-extralibs.tar.bz2 +Patch0: ghc-6.8.3-libraries-config.patch URL: http://haskell.org/ghc/ Requires: %{ghcver} = %{version}-%{release}, chkconfig BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -35,8 +36,8 @@ BuildRequires: gmp-devel, readline-devel #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 @@ -96,6 +97,8 @@ you like to have local access to the documentation in HTML format. %prep %setup -q -n %{name}-%{version} -b1 +%patch0 -p1 -b .hdkl + %build %if %{package_debugging} cd .. @@ -110,6 +113,7 @@ echo "GhcLibWays=" >> mk/build.mk echo "GhcRTSWays=thr debug" >> mk/build.mk %endif +HaddockCmd=%{_bindir}/haddock-0.9 \ ./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \ --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} \ @@ -118,16 +122,16 @@ echo "GhcRTSWays=thr debug" >> mk/build.mk cat <> mk/build.mk docdir := %{_docdir}/%{name}-%{version} -htmldir := $(docdir) -dvidir := $(docdir) -pdfdir := $(docdir) -psdir := $(docdir) +htmldir := \$(docdir) +dvidir := \$(docdir) +pdfdir := \$(docdir) +psdir := \$(docdir) HADDOCK_PATH_HACK # drop truncated copy of header (#222865) rm libraries/network/include/Typeable.h -make %{_smp_mflags} all +make %{_smp_mflags} all libexecdir=%{_libexecdir} %if %{build_doc} make %{_smp_mflags} html make %{_smp_mflags} -C libraries HADDOCK_DOCS=YES @@ -137,7 +141,8 @@ make %{_smp_mflags} -C libraries HADDOCK_DOCS=YES %install rm -rf $RPM_BUILD_ROOT -make DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir}/%{name}-%{version} install +make DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir}/%{name}-%{version} \ + libexecdir=%{_libexecdir}/%{name}-%{version} install %if %{build_doc} make DESTDIR=${RPM_BUILD_ROOT} XMLDocWays="html" HADDOCK_DOCS=YES install-docs @@ -151,7 +156,7 @@ cp libraries/*.html ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-%{version}/libraries 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} .%{_libexecdir}/%{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 \) ) # make paths absolute (filter "./usr" to "/usr") @@ -170,10 +175,7 @@ mv ${RPM_BUILD_ROOT}%{_bindir}/hsc2hs ${RPM_BUILD_ROOT}%{_bindir}/hsc2hs-ghc %clean rm -rf $RPM_BUILD_ROOT - %post -/usr/bin/chcon -t unconfined_execmem_exec_t %{_bindir}/{hasktags,runghc,runhaskell} >/dev/null 2>&1 || : - # Alas, GHC, Hugs, and nhc all come with different set of tools in # addition to a runFOO: # @@ -191,10 +193,6 @@ 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 || : - - %preun if test "$1" = 0; then update-alternatives --remove runhaskell %{_bindir}/runghc diff --git a/sources b/sources index 4db841c..cf8f101 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -5b4fd263f4ae3c16ee97c5587f0f108e ghc-6.8.2.20080527-src-extralibs.tar.bz2 -fc57e6e290d0d6531a5e081b164fed78 ghc-6.8.2.20080527-src.tar.bz2 +5ac72f5d5433151cf6b718dc6601dc41 ghc-6.8.3-src-extralibs.tar.bz2 +dfa31028b4d06d1d226f55fe3a2ab7b3 ghc-6.8.3-src.tar.bz2