summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorlockshaw2019-02-04 20:28:04 -0800
committerlockshaw2019-02-04 20:28:17 -0800
commitc1d073e52966e754424b296c0d7610bbe5fdbf52 (patch)
treee40890f989d4743e3db2f9b720e1b4f00ca86c91 /PKGBUILD
downloadaur-python-cle-git.tar.gz
Add package tracking cle git master
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..dfdd357a0af
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Colin Unger <mastakata 3 at yahoo dot com>
+
+pkgname=python-cle-git
+pkgdesc="A binary loader in python"
+url="https://github.com/angr/cle"
+pkgver=8.19.2.4.r734.050ffe4
+pkgrel=1
+arch=('any')
+depends=('python' 'python-pyelftools' 'python-cffi' 'python-idalink' 'python-archinfo-git' 'python-pyvex-git' 'python-pefile' 'python-sortedcontainers')
+makedepends=('git' 'python-setuptools')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+license=('BSD')
+source=("$pkgname::git+https://github.com/angr/cle.git#branch=master")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+
+ regex='[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+'
+ prefix='ticked version number to'
+ rev_num="$(git rev-list --count HEAD)"
+ version_no="$(git log -n1 --grep "$prefix $regex" --format=tformat:%s | sed "s/$prefix \($regex\)/\1/g")"
+ last_commit="$(git rev-parse --short HEAD)"
+ echo "$version_no.r$rev_num.$last_commit"
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+ python setup.py build
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}