summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 74f3753e81da2989fce9e87c2ad1493786b8e665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: Chih-Hsuan Yen <yan12125@gmail.com>

_pkgname=python-hashpumpy
pkgname=$_pkgname-git
pkgver=1.2.0.r8.g314268e
pkgrel=1
pkgdesc=" A tool to exploit the hash length extension attack in various hashing algorithms"
arch=("i686" "x86_64")
url="https://github.com/bwall/HashPump"
license=('MIT')
makedepends=('git')
depends=('openssl' 'python')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
source=("$_pkgname"::"git+https://github.com/bwall/HashPump")
md5sums=('SKIP')

pkgver() {
    cd $_pkgname
    git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g;s/^v//'
}

build() {
    cd $_pkgname
    python setup.py build
}

check() {
    cd $_pkgname

    export PYTHONPATH="$(pwd)/build/lib.linux-$CARCH-3.7:$PYTHONPATH"
    python test.py
}

package() {
    cd $_pkgname

    python setup.py install --root="$pkgdir" --optimize=1 --skip-build

    install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}