diff options
author | Dino Morelli | 2015-11-18 17:18:09 -0500 |
---|---|---|
committer | Dino Morelli | 2015-11-18 17:18:09 -0500 |
commit | c2c227eee01de69a9516e87c748cf2c597ca1bc0 (patch) | |
tree | e98ebc05af9fadc711b47c5839accee0d6cb8bc1 /PKGBUILD | |
download | aur-c2c227eee01de69a9516e87c748cf2c597ca1bc0.tar.gz |
Changed package name to from darcs to darcs-sandbox
The old repo name, `darcs`, is now conflicting with the official
`darcs` package in community. But I think there is still value
in having a sandboxed build of darcs, particularly for Haskell
developers needing to keep extraneous libraries out of their global
GHC installation.
Also updated this package to the latest darcs upstream version.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5fdc67ef44d5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Dino Morelli <dino@ui3.info> +# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com> +# Contributor: Vesa Kaihlavirta <vesa@archlinux.org> +# Contributor: Simo Leone <neotuli@gmail.com> + +pkgname=darcs-sandbox +_pkgname=darcs +pkgver=2.10.2 +pkgrel=1 +pkgdesc='Elegant and powerful distributed revision control system. Standalone sandbox build.' +arch=('i686' 'x86_64') +url='http://darcs.net/' +license=('GPL') +depends=('curl' 'libffi') +makedepends=('cabal-install' 'chrpath' 'ghc' 'inotify-tools') +options=('strip') +source=("http://darcs.net/releases/${_pkgname}-${pkgver}.tar.gz") + +sha256sums=('6337d3fac04711fa2ef5813558b409c59166c5599b0c9d68c418d21cdccfb327') + +# PKGBUILD functions + +build() { + cd ${srcdir}/${_pkgname}-${pkgver} + + # I've seen this cause a problem in the past. If necessary, do a + # cabal update manually and comment it out here. + cabal update + + cabal sandbox init + cabal install --only-dependencies + cabal configure -O --prefix=/usr + + binPath=${srcdir}/${_pkgname}-${pkgver}/dist/build/${_pkgname}/${_pkgname} + + cabal build + + # This build often weirdly keeps the file open even after the + # process returns, && doesn't work. So, wait for it: + inotifywait -e close $binPath + + # Remove bogus rpath data that points to temp build dir + chrpath -d $binPath +} + +package() { + cd ${srcdir}/${_pkgname}-${pkgver} + + cabal copy --destdir=${pkgdir} + + # darcs is both a binary and a library. This packaging exists + # solely to give the user the darcs binary. Unfortunately the only + # way I found to prevent installation of these files was to blow + # away this dir just prior to packaging: + rm -r ${pkgdir}/usr/lib + + chmod 755 ${pkgdir}/usr/share/man/man1/${_pkgname}.1 +} |