summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ee49ea1bce1c590331cc2403f47f1ddacec4507a (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
# Maintainer: peippo <christoph.fink@gmail.com>

pkgname="python-dhash"
_name=${pkgname#python-}
pkgdesc="Calculate the difference hash (perceptual hash) for an image"
url="https://github.com/Jetsetter/dhash"

pkgver=1.4
pkgrel=5

arch=("any")
license=("MIT")

makedepends=(
    python-build
    python-installer
    python-setuptools
    python-wheel
)
depends=(
    "python"
    "python-pillow"
)

source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
b2sums=('b2a86fb8d7acb46dc3b6d37ba3d0de78c0cd0fdb387d3b6a948ced747ea07e8152e91cb46d7c6e8e305be6d6c7b96bd668c218069ef9d1e84afa96bb2b851fa1')

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

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

    install -Dm0644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}