summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaichi Shinozaki2015-06-16 15:36:44 +0900
committerDaichi Shinozaki2015-06-16 15:36:44 +0900
commita7613e0632818300ff72a52224a5ca4934e24d68 (patch)
treefcf9dd61d5714dc396a6ca47f3dfed1ec679965b
downloadaur-a7613e0632818300ff72a52224a5ca4934e24d68.tar.gz
Initial import
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD66
2 files changed, 88 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..980e9ee4e2a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = casperjs-git
+ pkgdesc = Navigation scripting & testing utility for PhantomJS and SlimerJS
+ pkgver = 20150602
+ pkgrel = 1
+ url = https://github.com/n1k0/casperjs
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = npm
+ makedepends = python2-sphinx
+ depends = nodejs
+ depends = python2
+ optdepends = slimerjs: run your tests against Gecko (Firefox) instead of Webkit (just add –engine=slimerjs to your command line options)
+ provides = casperjs
+ conflicts = casperjs
+ options = !strip
+ source = git+https://github.com/n1k0/casperjs
+ sha256sums = SKIP
+
+pkgname = casperjs-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c78edb22447
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,66 @@
+# Maintainer: Daichi Shinozaki <dsdseg@gmail.com>
+# Contributor: Bruno Vieira <mail@bmpvieira.com>
+# Contributor: Andy Weidenbaum <archbaum@gmail.com>
+
+pkgname=casperjs-git
+pkgver=20150602
+pkgrel=1
+pkgdesc="Navigation scripting & testing utility for PhantomJS and SlimerJS"
+arch=('i686' 'x86_64')
+depends=('nodejs' 'python2')
+makedepends=('git' 'npm' 'python2-sphinx')
+optdepends=('slimerjs: run your tests against Gecko (Firefox) instead of Webkit (just add –engine=slimerjs to your command line options)')
+url="https://github.com/n1k0/casperjs"
+license=('MIT')
+source=(git+https://github.com/n1k0/casperjs)
+sha256sums=('SKIP')
+options=('!strip')
+provides=('casperjs')
+conflicts=('casperjs')
+_pkgname=${pkgname%-git}
+
+pkgver() {
+ cd $_pkgname
+ git log -1 --format="%cd" --date=short | sed "s|-||g"
+}
+
+build() {
+ cd $_pkgname
+
+ msg 'Fetching NPM dependencies...'
+ npm install --python=python2
+
+ msg 'Building man pages...'
+ make build -C docs/
+}
+
+package() {
+ cd $_pkgname
+
+ msg 'Installing license...'
+ install -Dm 644 LICENSE.md "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE.md"
+
+ msg 'Installing documentation...'
+ install -dm 755 "$pkgdir/usr/share/doc/${pkgname%-git}"
+ find docs/_build/ -mindepth 1 -maxdepth 1 -type f -name "*.html" -exec \
+ cp -dpr --no-preserve=ownership '{}' "$pkgdir/usr/share/doc/${pkgname%-git}" \;
+ cp -dpr --no-preserve=ownership docs CHANGELOG.md CONTRIBUTING.md README.md \
+ "$pkgdir/usr/share/doc/${pkgname%-git}"
+
+ msg 'Installing...'
+ install -dm 755 "$pkgdir/opt/$_pkgname"
+ install -dm 755 "$pkgdir/{usr/share,opt}/$_pkgname"
+ find . -mindepth 1 -maxdepth 1 -exec \
+ cp -dpr --no-preserve=ownership '{}' "$pkgdir/opt/$_pkgname" \;
+
+ mkdir -m755 -p $pkgdir/usr/bin
+ mkdir -m755 -p $pkgdir/opt/casperjs/bin
+
+ install -m755 bin/* "$pkgdir"/opt/casperjs/bin
+ install -m755 package.json "$pkgdir"/opt/casperjs/
+ ln -sf /opt/$_pkgname/bin/$_pkgname $pkgdir/usr/bin/$_pkgname
+
+ msg 'Cleaning up pkgdir...'
+ find "$pkgdir" -type d -name .git -exec rm -r '{}' +
+ find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
+}