%define _enable_debug_packages %{nil} %define debug_package %{nil} Name: ghc Version: 6.10.4 Release: %mkrel 3 Summary: Glasgow Haskell Compilation system License: BSD style Group: Development/Other Source: 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/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gmp-devel, readline-devel, flex, perl, docbook-utils BuildRequires: ghc BuildRequires: ncurses-devel #BuildRequires: mesaglut-devel BuildRequires: gcc #BuildRequires: haddock >= 0.8 BuildRequires: happy, alex BuildRequires: libxslt-proc, docbook-style-xsl #BuildRequires: openal-devel Requires: gcc Epoch: 0 # this is not an error, you need need to link application Requires: gmp-devel Provides: haskell-compiler = %{version} Provides: haskell-interactive = %{version} Obsoletes: haskell-filepath < 1.1.0.2 BuildRequires: haskell-macros >= 6.0 %description 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 foreign language interfaces (C, C++, etc). %package -n ghc-prof Summary: Profiling libraries for GHC Group: Development/Other Requires: ghc = %{epoch}:%{version}-%{release} %description -n ghc-prof Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC). They should be installed when GHC's profiling subsystem is needed. %package doc Summary: GHC docs Group: Development/Other %description doc 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 foreign language interfaces (C, C++, etc). %define __spec_install_post /usr/lib/rpm/brp-compress %prep %setup -q -b 1 -n ghc-%{version} # Fix path for module perl -pi -e 's/"lib"/"%_lib"/' libraries/Cabal/Distribution/Simple/InstallDirs.hs %build #%ifarch x86_64 #echo "GhcUnregisterised=YES" > mk/build.mk #echo "SplitObjs=NO" >> mk/build.mk #%endif # disable OpenAL : it breaks build :-( --disable-openal ./configure --prefix=%{_prefix} --libdir=%{_libdir} --disable-alut %make CFLAGS="%{optflags}" make html %install rm -rf %{buildroot} make DESTDIR=%{buildroot} \ "DO_NOT_INSTALL=pwd installPackage haddock" \ install echo %{_docdir} make DESTDIR=%{buildroot} \ docdir=%{_docdir}/%{name} \ mandir=%{_mandir} install-docs SRC_TOP=$PWD rm -f rpm-*.files ( cd %{buildroot} find .%{_libdir} \( -type f \( -name '*.p_hi' -o -name '*_p.a' \) -fprint $SRC_TOP/rpm-prof.files \) -o \( -type f -not -name 'package.conf' -fprint $SRC_TOP/rpm-ghc.files \) sed -i '/%{_lib}$/d' $SRC_TOP/rpm-ghc.files ) # make paths absolute (filter "./usr" to "/usr") perl -pi -e "s|\.%{_prefix}|%{_prefix}|" rpm-*.files # Haskell Provides, ugly way, we can't trust .cabal mkdir -p %buildroot%_cabal_pkg_deps_dir touch %buildroot%_cabal_pkg_deps_dir/{provides,requires} # Haskell magic provides ./utils/ghc-pkg/dist-install/build/ghc-pkg/ghc-pkg \ list --simple-output \ --global-conf=./inplace-datadir/package.conf \ | perl -p -e 's/ *([\w-]*)-([^-, ]*)[, ]*/haskell($1) = $2\n/g' \ | sort | uniq \ > %buildroot%_cabal_pkg_deps_dir/provides %check grep haskell98 %buildroot%_cabal_pkg_deps_dir/provides >/dev/null if [ $? -ne 0 ] ; then echo "I cannot find basic provides in %buildroot%_cabal_pkg_deps_dir/provides" echo "Please check..." exit 1 fi %clean rm -rf %{buildroot} %files -f rpm-ghc.files %defattr(-,root,root,-) %{_bindir}/* %dir %{_libdir}/ghc-%{version} #- TODO move this under /etc or don't flag it as config file %config %{_libdir}/ghc-%{version}/package.conf %doc ANNOUNCE LICENSE README %doc HACKING %{?_cabal_rpm_files} %{_mandir}/man1/* %files -n ghc-prof -f rpm-prof.files %defattr(-,root,root,-) %files doc %doc %_docdir %changelog * Tue Feb 09 2010 Funda Wang <fwang@mandriva.org> 0:6.10.4-3mdv2010.1 + Revision: 503368 - rebuild for new gmp * Sat Dec 05 2009 Funda Wang <fwang@mandriva.org> 0:6.10.4-2mdv2010.1 + Revision: 473989 - obsoletes filepath module * Wed Jul 22 2009 Frederik Himpe <fhimpe@mandriva.org> 0:6.10.4-1mdv2010.0 + Revision: 398652 - update to new version 6.10.4 * Tue May 19 2009 Frederik Himpe <fhimpe@mandriva.org> 0:6.10.3-1mdv2010.0 + Revision: 377786 - update to new version 6.10.3 * Tue Dec 02 2008 Olivier Thauvin <nanardon@mandriva.org> 0:6.10.1-1mdv2009.1 + Revision: 309260 - 6.10.1 * Thu Aug 07 2008 Adam Williamson <awilliamson@mandriva.org> 0:6.8.3-1mdv2009.0 + Revision: 265845 - clean a few vars - new release 6.8.3 + Thierry Vignaud <tvignaud@mandriva.com> - rebuild * Thu Jan 17 2008 Olivier Thauvin <nanardon@mandriva.org> 0:6.8.2-1mdv2008.1 + Revision: 153915 - 6.8.2 * Wed Jan 09 2008 Olivier Thauvin <nanardon@mandriva.org> 0:6.8.1-2mdv2008.1 + Revision: 147035 - fix libdir path on lib64 in cabal module + Thierry Vignaud <tvignaud@mandriva.com> - fix mesa BR - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Thu Nov 08 2007 Olivier Thauvin <nanardon@mandriva.org> 0:6.8.1-1mdv2008.1 + Revision: 106919 - kill now usesell patch0 - 6.8.1 + Gaëtan Lehmann <glehmann@mandriva.org> - rebuild to fix missing package in x86_64 * Sat May 05 2007 Olivier Thauvin <nanardon@mandriva.org> 0:6.6.1-2mdv2008.0 + Revision: 23039 - readd haskell() provides, add a check section to avoid another breakage * Fri May 04 2007 Pixel <pixel@mandriva.com> 0:6.6.1-1mdv2008.0 + Revision: 22471 - BuildRequires docbook-style-xsl is needed to build documentation - BuildRequires libxslt-proc is needed to build documentation - new release, 6.6.1 - new ghc manpage added - move install-docs into %%install (inspiration from upstream .spec) * Mon Mar 12 2007 Olivier Thauvin <nanardon@mandriva.org> 0:6.6-4mdv2007.1 + Revision: 141468 - bump release - rebuild with haskell rpm provides * Mon Mar 05 2007 Olivier Thauvin <nanardon@mandriva.org> 0:6.6-3mdv2007.1 + Revision: 132930 - add provide haskell-compiler, haskell-interactive * Thu Dec 21 2006 Michael Scherer <misc@mandriva.org> 0:6.6-2mdv2007.1 + Revision: 100890 - bump release - add ghc extralibs, needed to compile pugs * Sun Dec 10 2006 Michael Scherer <misc@mandriva.org> 0:6.6-1mdv2007.1 + Revision: 94556 - update to 6.6 - place docs in %%doc - clean spec + Gaëtan Lehmann <glehmann@mandriva.org> - Import ghc * Sun May 14 2006 Gaetan Lehmann <gaetan.lehmann@jouy.inra.fr> 6.4.2-3mdk - rebuild manually (iurt seems to be stuck) * Sun May 07 2006 Gaetan Lehmann <gaetan.lehmann@jouy.inra.fr> 6.4.2-2mdk - patch1: fix installation path of module on x86_64 - disable alut (build fail on deborah (why ?)) * Sun May 07 2006 Gaetan Lehmann <gaetan.lehmann@jouy.inra.fr> 6.4.2-1mdk - New release 6.4.2 - build with OpenAL * Tue Jan 03 2006 Olivier Thauvin <nanardon@mandriva.org> 6.4.1-2mdk - add Requires on gmp-devel as it is need to link any basic apps * Wed Sep 28 2005 Gaetan Lehmann <gaetan.lehmann@jouy.inra.fr> 6.4.1-1mdk - final realease (make ghci work on x86_64!) - drop ghc version build requirement * Sat Jul 02 2005 Gaetan Lehmann <gaetan.lehmann@jouy.inra.fr> 6.4.1-0.20050630.1mdk - 6.4.1 fix lots of issues on x86_64, even if ghci is still not usable - drop all patches (all merged upstream) - build docs with haddock 0.7 - fix files listed twice warning - build with default gcc - build docs in build section - use %%configure * Fri May 27 2005 Gaetan Lehmann <gaetan.lehmann@jouy.inra.fr> 6.4-4mdk - rebuild with itself - use gcc 3.3 (can't be built with 4.0) * Sun May 22 2005 Gaetan Lehmann <gaetan.lehmann@jouy.inra.fr> 6.4-3mdk - use mkrel - add missing build requirement - add patches from fedora - disable OpenAL - drop ghc requirement for x86_64 bootstrap * Tue Mar 15 2005 Rafael Garcia-Suarez <rgarciasuarez@mandrakesoft.com> 6.4-2mdk - Rebuild with itself * Fri Mar 11 2005 Rafael Garcia-Suarez <rgarciasuarez@mandrakesoft.com> 0:6.4-1mdk - New version 6.4 - BuildRequire previous ghc for bootstrapping * Mon Feb 21 2005 Rafael Garcia-Suarez <rgarciasuarez@mandrakesoft.com> 0:6.2.2-2mdk - Release for Mandrakelinux - Don't build docs with haddock for now - Don't BuildRequires itself for bootstrapping - Reorganize subpackages * Fri Jan 21 2005 Jens Petersen <petersen@haskell.org> - 0:6.2.2-2 - add x86_64 port - build unregistered and without splitobjs - specify libdir to configure and install - rename ghc-prof to ghcXYZ-prof, which obsoletes ghc-prof * Mon Dec 06 2004 Jens Petersen <petersen@haskell.org> - 0:6.2.2-1 - move ghc requires to ghcXYZ * Wed Nov 24 2004 Jens Petersen <petersen@haskell.org> - 0:6.2.2-0.fdr.1 - ghc622 - provide ghc = %%version - require gcc, gmp-devel and readline-devel * Sat Oct 16 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:6.2.2-0.fdr.1 - New Version 6.2.2 * Mon Mar 22 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:6.2.1-0.fdr.1 - New Version 6.2.1