#Packager: Tim Beech #This package leans heavily on the SlackBuild by Jockey S. Kyd #and Christoph Willing pkgname=haskell-platform pkgver=2012.4.0.0 pkgrel=1tjb #arch=noarch source=("haskell-platform-2012.4.0.0.tar.gz" "honour_libdir.diff" "not_update_pkg_db.diff") sourcetemplate=http://people.salixos.org/mimosa/$pkgname/$pkgver/ docs=("readme" "install" "copying" "changelog" "authors" "news" "todo") url=http://www.haskell.org/platform/ #dotnew=() #CFLAGS= #CXXFLAGS= #options=('noextract') doinst() { echo "Recaching packages" ghc-pkg recache } slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "haskell-platform" "Haskell with batteries included." "The Haskell Platform is a comprehensive, robust environment for" "Haskell development that is easy to get started with while providing" "a full set of tools for major projects, maximising the stability of" "your code. Includes Cabal, Haddock, Happy, Alex, the GHCi debugger," "the hsc2hs C library binding tool, the GHC profiler, and HPC. For" "documentation, see http://www.haskell.org/platform/contents.html" "This package is intended to be added to a bare Haskell system, i.e." "GHC alone (and the dependency hscolour)." ) build() { cd $startdir/src/$pkgname-$pkgver # Ensure libdir is passed to each package patch -p0 < ./honour_libdir.diff # get path and version of ghc GHC_VERSION=$(ghc --numeric-version) ./configure --enable-unsupported-ghc-version \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --docdir=/usr/doc/$pkgname-$pkgver \ --mandir=/usr/man make -j $numjobs || return 1 patch -p1 < ./not_update_pkg_db.diff sed -i "s:\(\./Setup copy\):\1 --destdir=$PKG:" scripts/install.sh make install # collecting config files PKGCONFDIR=$startdir/pkg/usr/lib${LIBDIRSUFFIX}/ghc-${GHC_VERSION}/package.conf.d mkdir -p $PKGCONFDIR for pkg in $(cat packages/platform.packages); do pkg_conf=packages/${pkg}/${pkg}.conf if [ -f $pkg_conf ]; then mv $pkg_conf $PKGCONFDIR fi done # make sure no stray docs mkdir -p $startdir/pkg/usr/doc if [ -d $startdir/pkg/usr/share/doc ]; then mv $startdir/pkg/usr/share/doc/* $startdir/pkg/usr/doc/ rmdir $startdir/pkg/usr/share/doc fi chmod -R go-w $startdir/pkg/usr/doc }