[arch-haskell] Example PKGBUILD
Don Stewart
dons at galois.com
Sat Oct 12 07:35:47 UTC 2013
Here's an example of what new PKGBUILDs look like if we rely on the
"provides" semantics.
You see how this works even if say, haskell-containers is moved out of the ghc set?
Our deps will continue to be correct.
We should never have relied on cabal2arch to fake "provides" in the first place :)
The key now will be ensuring that GHC's provides list is 100% accurate.
# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
# Package generated by cabal2arch 0.7
# Note: we list all package dependencies.
# Your package tool should understand 'provides' syntax
#
pkgname=xmonad
pkgrel=1
pkgver=0.9
pkgdesc="A tiling window manager"
url="http://hackage.haskell.org/package/xmonad"
license=('custom:BSD3')
arch=('i686' 'x86_64')
makedepends=()
depends=('gmp' 'ghc' 'haskell-cabal' 'haskell-x11>=1.4.6.1' 'haskell-containers' 'haskell-directory' 'haskell-filepath' 'haskell-mtl' 'haskell-process' 'haskell-unix')
options=('strip')
source=(http://hackage.haskell.org/packages/archive/xmonad/0.9/xmonad-0.9.tar.gz)
install=xmonad.install
md5sums=('5ec4ec7b6ab1ec841ceca07184a28ba7')
build() {
cd ${srcdir}/xmonad-0.9
runhaskell Setup configure --prefix=/usr --docdir=/usr/share/doc/${pkgname} || return 1
runhaskell Setup build || return 1
runhaskell Setup haddock || return 1
runhaskell Setup register --gen-script || return 1
runhaskell Setup unregister --gen-script || return 1
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/$pkgname/register.sh
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/$pkgname/unregister.sh
install -d -m755 $pkgdir/usr/share/doc/ghc/libraries
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/libraries/xmonad
runhaskell Setup copy --destdir=${pkgdir} || return 1
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1
rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
}
More information about the arch-haskell
mailing list