summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD58
2 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..efc679c526b2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = darcs-sandbox
+ pkgdesc = Elegant and powerful distributed revision control system. Standalone sandbox build.
+ pkgver = 2.10.2
+ pkgrel = 1
+ url = http://darcs.net/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = cabal-install
+ makedepends = chrpath
+ makedepends = ghc
+ makedepends = inotify-tools
+ depends = curl
+ depends = libffi
+ options = strip
+ source = http://darcs.net/releases/darcs-2.10.2.tar.gz
+ sha256sums = 6337d3fac04711fa2ef5813558b409c59166c5599b0c9d68c418d21cdccfb327
+
+pkgname = darcs-sandbox
+
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
+}