summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKean Sum Ooi2017-09-30 21:39:43 +0800
committerKean Sum Ooi2017-09-30 21:39:43 +0800
commit284b50db16301c2e20362003521ae73082d6ad38 (patch)
treeacee2f0089837f9e38afd65de38dc1955835fdf3
downloadaur-284b50db16301c2e20362003521ae73082d6ad38.tar.gz
initial version
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD38
-rw-r--r--htcap.install9
3 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6e1aac6ab5de
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = htcap-git
+ pkgdesc = Single Page Application (SPA) crawler by intercepting AJAX calls and DOM changes
+ pkgver = 1.0.1.r36.gdcc0078
+ pkgrel = 1
+ url = http://htcap.org/
+ install = htcap.install
+ arch = x86_64
+ arch = i686
+ license = GPL2
+ makedepends = git
+ depends = python2
+ depends = phantomjs
+ depends = sqlmap
+ optdepends = arachni
+ source = git+https://github.com/segment-srl/htcap
+ md5sums = SKIP
+
+pkgname = htcap-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..83e594c56f2b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: kso <keansum AT gmail DOT com>
+
+pkgname=htcap-git
+_pkgname=htcap
+pkgver=1.0.1.r36.gdcc0078
+pkgrel=1
+pkgdesc="Single Page Application (SPA) crawler by intercepting AJAX calls and DOM changes"
+arch=('x86_64' 'i686')
+url="http://htcap.org/"
+license=('GPL2')
+depends=('python2'
+ 'phantomjs'
+ 'sqlmap')
+optdepends=('arachni')
+makedepends=('git')
+install=htcap.install
+source=('git+https://github.com/segment-srl/htcap')
+md5sums=('SKIP')
+
+prepare() {
+ cd "$srcdir/$_pkgname"
+ sed -i 's_#\!/usr/bin/env python_#\!/usr/bin/env python2.7_' htcap.py
+}
+
+pkgver() {
+ cd "$_pkgname"
+ # cutting off 'v' prefix that presents in the git tag
+ # adding the r and replacing '.' with '-'.
+ # eg. v1.0.1-36-gdcc0078 becomes
+ # 1.0.1.r36.gdcc0078
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+
+package() {
+ mkdir -p "$pkgdir"/usr/share/
+ mv "$_pkgname" "$pkgdir"/usr/share/
+}
diff --git a/htcap.install b/htcap.install
new file mode 100644
index 000000000000..e0ab69d906bb
--- /dev/null
+++ b/htcap.install
@@ -0,0 +1,9 @@
+# arg 1: the new package version
+post_install() {
+ ln -s /usr/share/htcap/htcap.py /usr/local/bin/htcap
+}
+
+# arg 1: the old package version
+pre_remove() {
+ rm /usr/local/bin/htcap
+}