summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2bbac87b5e4977d6bbbb4e1bfa56c1ecedd08dec (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
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer:
# Contributor: Dobroslaw Kijowski [dobo] <dobo90_at_gmail.com>

_pkgname=python-ssdeep
pkgname=$_pkgname-git
pkgver=3.4.1.r12.g624ac7b
pkgrel=1
pkgdesc='Python wrapper for ssdeep fuzzy hashing library'
arch=('i686' 'x86_64')
url='https://github.com/DinoTools/python-ssdeep'
license=('LGPL3')
depends=(
  'python-cffi'
  'ssdeep'
)
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-pip'
  'python-setuptools'
  'python-setuptools-scm'
  'python-wheel'
)
checkdepends=(
  'python-pytest'
  'python-pytest-runner'
  'unzip'
)
provides=("$_pkgname")
conflicts=(${provides[@]})

source=("$_pkgname"::"git+$url")
md5sums=('SKIP')

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

build() {
  cd "$srcdir/$_pkgname"
  python -m build --no-isolation --wheel
}

check() {
  cd "$srcdir/$_pkgname"
  unzip dist/*.whl
  pytest
}

package() {
  cd "$srcdir/$_pkgname"
  python -m installer --destdir="$pkgdir" dist/*.whl
}