rpms/ghc/devel .cvsignore, 1.8, 1.9 ghc.spec, 1.21, 1.22 sources, 1.10, 1.11

Bryan O'Sullivan (bos) fedora-extras-commits at redhat.com
Sun Sep 30 03:07:36 UTC 2007


Author: bos

Update of /cvs/extras/rpms/ghc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16961

Modified Files:
	.cvsignore ghc.spec sources 
Log Message:
Update to ghc-6.8.0.20070928



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/.cvsignore,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- .cvsignore	10 May 2007 17:09:49 -0000	1.8
+++ .cvsignore	30 Sep 2007 03:06:57 -0000	1.9
@@ -1,2 +1,2 @@
-ghc-6.6.1-src.tar.bz2
-ghc-6.6.1-src-extralibs.tar.bz2
+ghc-6.8.0.20070928-src-extralibs.tar.bz2
+ghc-6.8.0.20070928-src.tar.bz2


Index: ghc.spec
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/ghc.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ghc.spec	10 May 2007 19:52:43 -0000	1.21
+++ ghc.spec	30 Sep 2007 03:06:57 -0000	1.22
@@ -1,12 +1,24 @@
-%define ghcver ghc661
+%define ghcver ghc680
 
 # speed up test builds by not building profiled libraries
 %define build_prof 1
 %define build_doc 1
 
+# Fixing packaging problems can be a tremendous pain because it
+# generally requires a complete rebuild, which takes hours.  To offset
+# the misery, do a complete build once using "rpmbuild -bc", then copy
+# your built tree to a directory of the same name suffixed with
+# ".built", using "cp -al".  Finally, set this variable, and it will
+# copy the already-built tree into place during %build instead of
+# actually doing the build.
+#
+# Obviously, this can only work if you leave the %build section
+# completely untouched between builds.
+%define package_debugging 0
+
 Name:		ghc
-Version:	6.6.1
-Release:	3%{?dist}
+Version:	6.8.0.20070928
+Release:	1%{?dist}
 Summary:	Glasgow Haskell Compilation system
 # See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239713
 ExcludeArch:	ppc64
@@ -15,15 +27,15 @@
 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
 URL:		http://haskell.org/ghc/
-Requires:	%{ghcver} = %{version}-%{release}
+Requires:	%{ghcver} = %{version}-%{release}, chkconfig
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  ghc, sed
-Buildrequires:  gmp-devel, readline-devel
-Buildrequires:  libX11-devel, libXt-devel
-Buildrequires:  freeglut-devel, openal-devel
+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
+BuildRequires: libxslt, docbook-style-xsl, haddock >= 0.8
 %endif
 Prefix:		%{_prefix}
 
@@ -82,31 +94,49 @@
 %define __spec_install_post /usr/lib/rpm/brp-compress
 
 %prep
-%setup -q -n ghc-%{version} -b1
+%setup -q -n %{name}-%{version} -b1
 
 %build
+%if %{package_debugging}
+cd ..
+rm -rf %{name}-%{version}
+cp -al %{name}-%{version}.built %{name}-%{version}
+cd %{name}-%{version}
+exit 0
+%endif
+
 %if !%{build_prof}
 echo "GhcLibWays=" >> mk/build.mk
 echo "GhcRTSWays=thr debug" >> mk/build.mk
 %endif
 
-./configure --prefix=%{_prefix} --libdir=%{_libdir}
+./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}
 
 # drop truncated copy of header (#222865)
 rm libraries/network/include/Typeable.h
 
-make all
+make %{_smp_mflags} docdir=%{_docdir}/%{name}-%{version} all
 %if %{build_doc}
-make html
+make %{_smp_mflags} docdir=%{_docdir}/%{name}-%{version} 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 prefix=$RPM_BUILD_ROOT%{_prefix} libdir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version} install
+make DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir}/%{name}-%{version} install
 
 %if %{build_doc}
-make mandir=$RPM_BUILD_ROOT%{_mandir} datadir=$RPM_BUILD_ROOT%{_docdir}/ghc-%{version} XMLDocWays="html" install-docs
+make DESTDIR=${RPM_BUILD_ROOT} docdir=%{_docdir}/%{name}-%{version} \
+  XMLDocWays="html" HADDOCK_DOCS=YES install-docs
+mv ${RPM_BUILD_ROOT}/%{_docdir}/%{name}/libraries \
+  ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-%{version}
+cp libraries/*.html ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-%{version}/libraries
 %endif
 
 SRC_TOP=$PWD
@@ -126,6 +156,7 @@
 # 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
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -140,6 +171,22 @@
 
 /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:
+#
+#   * GHC:  hsc2hs
+#   * Hugs: hsc2hs, cpphs
+#   * nhc:  cpphs
+#
+# Therefore it is currently not possible to use --slave below to form
+# link groups under a single name 'runhaskell'. Either these tools
+# should be disentangled from the Haskell implementations, or all
+# implementations should have the same set of tools. *sigh*
+
+update-alternatives --install %{_bindir}/runhaskell runhaskell \
+  %{_bindir}/runghc 500
+update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
+  %{_bindir}/hsc2hs-ghc 500
 
 %post -n %{ghcver}
 ## tweak prefix in drivers scripts if relocating
@@ -152,6 +199,13 @@
 /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
+  update-alternatives --remove hsc2hs     %{_bindir}/hsc2hs-ghc
+fi
+
+
 %files
 %defattr(-,root,root,-)
 %{_bindir}/*
@@ -181,6 +235,9 @@
 
 
 %changelog
+* Sat Sep 29 2007 Bryan O'Sullivan <bos at serpentine.com> - 6.8.0.20070928-1
+- prepare for GHC 6.8.1 by building a release candidate snapshot
+
 * Thu May 10 2007 Bryan O'Sullivan <bos at serpentine.com> - 6.6.1-3
 - install man page for ghc
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sources	10 May 2007 17:09:49 -0000	1.10
+++ sources	30 Sep 2007 03:06:57 -0000	1.11
@@ -1,2 +1,2 @@
-dea271503463bd28c27f25ab90998633  ghc-6.6.1-src.tar.bz2
-43a26b81608b206c056adc3032f7da2a  ghc-6.6.1-src-extralibs.tar.bz2
+8699ec00c510077ad6c632aea19ec1e0  ghc-6.8.0.20070928-src-extralibs.tar.bz2
+2f3d20ad0c68cd77a06b708e4d8360c5  ghc-6.8.0.20070928-src.tar.bz2




More information about the fedora-extras-commits mailing list