# Copyright (c) 2007-2008 Herbert Graeber # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments to herbert@links2linux.de # norootforbuild Name: ghc Version: 6.8.3 Release: 0 Summary: The Glasgow Haskell Compilation system Summary(de): Das Glasgow-Haskell-Compilation-System License: BSD style w/o adv. clause Group: Development/Languages/Haskell Source0: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2 Source1: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src-extralibs.tar.bz2 Patch0: ghc-optional-openal.patch URL: http://haskell.org/ghc/ Provides: ghc-array = 0.1.0.0 Provides: ghc-filepath = 1.1.0.0 Provides: ghc-network = 2.2.0.0 Provides: ghc-process = 1.0.0.1 Provides: ghc-template-haskell = 2.2.0.0 Provides: ghc-base = 3.0.2.0 Provides: ghc-GLUT = 2.1.1.2 Provides: ghc-old-locale = 1.0.0.0 Provides: ghc-QuickCheck = 1.1.0.0 Provides: ghc-time = 1.1.2.1 Provides: ghc-bytestring = 0.9.0.1.1 Provides: ghc-haskell98 = 1.0.1.0 Provides: ghc-old-time = 1.0.0.0 Provides: ghc-random = 1.0.0.0 Provides: ghc-unix = 2.3.0.1 Provides: ghc-Cabal = 1.2.4.0 Provides: ghc-haskell-src = 1.0.1.2 Provides: ghc-OpenGL = 2.2.1.1 Provides: ghc-readline = 1.0.1.0 Provides: ghc-xhtml = 3000.2.0.0 Provides: ghc-cgi = 3001.1.6.0 Provides: ghc-hpc = 0.5.0.1 Provides: ghc-packedstring = 0.1.0.0 Provides: ghc-regex-base = 0.72.0.1 Provides: ghc-containers = 0.1.0.2 Provides: ghc-html = 1.0.1.1 Provides: ghc-parallel = 1.0.0.1 Provides: ghc-regex-compat = 0.71.0.1 Provides: ghc-directory = 1.0.0.1 Provides: ghc-HUnit = 1.2.0.0 Provides: ghc-parsec = 2.1.0.1 Provides: ghc-regex-posix = 0.72.0.2 Provides: ghc-fgl = 5.4.2.0 Provides: ghc-mtl = 1.1.0.1 Provides: ghc-pretty = 1.0.0.0 Provides: ghc-stm = 2.1.1.1 PreReq: update-alternatives Requires: gmp-devel Requires: readline-devel Requires: update-alternatives BuildRequires: ghc >= 5.0 BuildRequires: happy >= 1.15 BuildRequires: alex >= 2.0 BuildRequires: ncurses-devel BuildRequires: gmp-devel BuildRequires: readline-devel BuildRequires: xorg-x11-Mesa-devel BuildRequires: freeglut-devel %if 0%{?suse_version} > 1020 BuildRequires: texlive-latex %else BuildRequires: te_latex %endif BuildRequires: haddock BuildRequires: libxslt BuildRequires: sgml-skel BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-utils %if 0%{?suse_version} >= 1020 BuildRequires: openal BuildRequires: freealut %endif BuildRequires: update-alternatives BuildRequires: java-1_6_0-sun BuildRequires: fop BuildRequires: xmltex %if 0%{?suse_version} <= 1010 BuildRequires: libpng %endif %if 0%{?suse_version} > 1020 BuildRequires: fdupes %endif Provides: haskell_compiler BuildRoot: %{_tmppath}/%{name}-%{version}-build Prefix: /usr # return use inversed values for booleans (= 0: true, !=0: false) %define check_haddock_ghc %(test `haddock --ghc-version` != %version; echo $?) %description Haskell is the standard purely functional programming language; the current language version is Haskell 98, agreed in December 1998. GHC is a state-of-the-art programming suite for Haskell. Included is 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 foreign language interfaces (C, C++, etc). A wide variety of Haskell related resources (tutorials, libraries, specifications, documentation, compilers, interprbeters, references, contact information, links to research groups) are available from the Haskell home page at . %package prof Summary: Profiling libraries for GHC Summary(de): Profiling-Libraries für GHC Group: Development/Libraries/Haskell Requires: %{name} = %{version}-%{release} Provides: GHC-prof = %{version} %description prof Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC). They should be installed when GHC's profiling subsystem is needed. %package doc Summary: Documentation for GHC Summary(de): Dokumentation für GHC Group: Development/Languages/Haskell %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 PostScript and HTML format. Alternatively, the documentation is available online at http://haskell.org/ghc/documentation.html # 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 -b 1 %patch0 -p1 %build export CFLAGS="$RPM_OPT_FLAGS" CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ ./configure --host=%{_target_platform} --build=%{_target_platform} --target=%{_target_platform} \ --program-prefix=%{?_program_prefix} --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} \ --infodir=%{_infodir} \ %if 0%{?suse_version} < 1020 --enable-openal=no \ %endif %ifarch x86_64 amd64 ia32e --enable-libsuffix=64 %endif # Don't install these tools, we'll use update-alternatives below. touch mk/build.mk echo "NO_INSTALL_RUNHASKELL=YES" >>mk/build.mk #echo "NO_INSTALL_HSC2HS=YES" >>mk/build.mk cat <<"EOF" >>mk/build.mk docdir := %{_docdir}/%{name}-doc htmldir := $(docdir) dvidir := $(docdir) pdfdir := $(docdir) psdir := $(docdir) EOF make %{?jobs:-j%jobs} all datadir="${_docdir}/%{name}-doc" %if %check_haddock_ghc make %{?jobs:-j%jobs} html make %{?jobs:-j%jobs} -C libraries HADDOCK_DOCS=YES ( cd libraries/Cabal && docbook2html doc/Cabal.xml --output doc/Cabal ) make -C docs/storage-mgt ps %endif %install %if %check_haddock_ghc make DESTDIR=%{buildroot} docdir=%{_docdir}/%{name}-doc HADDOCK_DOCS=YES install install-docs mkdir html-docs cp -a %{buildroot}%{_docdir}/%{name}-doc/{index.html,libraries} html-docs %else make DESTDIR=%{buildroot} docdir=%{_docdir}/%{name}-doc install %endif #mv %{buildroot}%{_prefix}/bin/hsc2hs %{buildroot}%{_prefix}/bin/hsc2hs-ghc dir=`pwd` pushd %{buildroot} libdir=`echo %{prefix}/%{_lib} | sed 's|^/||'` find $libdir ! -type d ! -name '*.p_hi' ! -name '*_p.a' -print | \ sed 's|^|/|' > $dir/rpm-noprof-lib-files find $libdir ! -type d \( -name '*.p_hi' -or -name '*_p.a' \) -print | \ sed 's|^|/|' > $dir/rpm-prof-lib-files popd %if 0%{?suse_version} > 1020 %fdupes $RPM_BUILD_ROOT %endif %post update-alternatives --install %{_bindir}/runhaskell runhaskell \ %{_bindir}/runghc 500 update-alternatives --install %{_bindir}/hsc2hs hsc2hs \ %{_bindir}/hsc2hs-ghc 500 %preun if test "$1" = 0; then update-alternatives --remove runhaskell %{_bindir}/runghc update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc fi %files -f rpm-noprof-lib-files %defattr(-,root,root) %doc ANNOUNCE %doc HACKING %doc LICENSE %doc README %{_bindir}/ghc %{_bindir}/ghc-%{version} %{_bindir}/ghc-pkg %{_bindir}/ghc-pkg-%{version} %{_bindir}/ghci %{_bindir}/ghci-%{version} %{_bindir}/ghcprof %{_bindir}/hasktags %{_bindir}/hp2ps %{_bindir}/hpc %{_bindir}/hsc2hs %{_bindir}/hsc2hs-ghc %{_bindir}/hsc2hs-ghc-%{version} %{_bindir}/runghc %if %check_haddock_ghc %{_mandir}/man1/ghc.1* %endif %files prof -f rpm-prof-lib-files %defattr(-,root,root) %files doc %defattr(-,root,root) %if %check_haddock_ghc %doc docs/comm %doc docs/docbook-cheat-sheet/docbook-cheat-sheet %doc docs/users_guide/users_guide %doc libraries/Cabal/doc/Cabal %doc html-docs/* %doc docs/storage-mgt/ldv.ps %doc docs/storage-mgt/rp.ps %doc docs/storage-mgt/sm.ps %endif %changelog * Mon Aug 18 2008 Herbert Graeber 6.8.3 - add provides for all libraries included - create a doc package even when docs cannot be created - remove support for SUSE Linux 10.0 and below - add requirement for readline-devel - do not build docs for ext-core for now - suppress some messages from rpmlint - no man page without docs - build docs only if the ghc version haddock has built with matches the ghc to build - fix ghc-pks doc location - update to version 6.8.3 * Fri Mar 04 2008 Herbert Graeber - ghc cannot use different host and target platforms (i686 and i586) * Wed Mar 02 2008 Herbert Graeber - build haddock docs * Wed Dec 12 2007 Herbert Graeber - Update to 6.8.2 * removed the --dodc-dir option * let standalone deriving declarations respect scope * several extensions to ghci command set * several bug fixes * Sun Dec 9 2007 Herbert Graeber - Update to 6.8.2 release candidate from 2007-12-06 * Sun Nov 25 2007 Herbert Graeber - Disable ps docs for SUSE Linux 10.0 and below * Wed Nov 21 2007 Herbert Graeber - Fixes for SUSE Linux 10.1 and below * Sun Nov 11 2007 Herbert Graeber - Update to version 6.8.1 * Haskell Program Coverage (hpc) support has been added to the compiler * GHCi now includes a debugger * The first phase of the base package split has been done * The code generator now uses pointer tagging (which should mean most code improves by 10-15%, and as a result the compiler is also faster). - Use update-alternatives to enable multiple ghc versions - Build with shared license file - Reenable ps docs * Wed Apr 25 2007 Herbert Graeber - Update to version 6.6.1 * Many, many bugs have been fixed relative to 6.6. Far too many to list here. * GHC can now be used to compile C++ files. * There is an --install-signal-handlers= RTS flag. The main use is to stop GHC installing signal handlers when you are putting your code in a DLL. * Newtypes can now be defined using GADT syntax. * Linear implicit parameters are no longer accepted. * There is a manpage for ghc and ghci. * The building guide has been moved to the wiki. * GHC now comes with the filepath library. * The base, cabal, regex-base, pretty-printer and unix packages have various bug fixes, as well as a couple of interface changes that shouldn't affect most users. The version numbers have been bumped. * There are newer versions of all of the extralibs. * Thu Oct 25 2006 Herbert Graeber - Enable openal and freealut support for openSUSE 10.2 * Mon Oct 16 2006 Herbert Graeber - Update to version 6.6 * Mon Sep 04 2006 Herbert Graeber - Use docbook-utils for html documentation - Require sgml-skel for build * Tue Aug 29 2006 Herbert Graeber - Disabled ps documentation (no fop without java) * Mon Aug 28 2006 Herbert Graeber - Move to the SUSE Build Service * Tue Apr 18 2006 Herbert Graeber - Update to version 6.4.2 - Removed openal/alut support (Does not work with SUSEs openal) * Wed Apr 12 2006 Herbert Graeber - SUSE 10.1 needs gmp-devel - Added patch for gcc 4.1 compatibility on x86_64 * Wed Sep 21 2005 Herbert Graeber - Update to version 6.4.1 * Tue Apr 19 2005 Herbert Graeber - Disabled object uplitting and ghci for x86_64 * Sun Mar 13 2005 Herbert Graeber - Update to version 6.4