summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8b92d3ccaf8f8d3c9a19fe8b72351fae0897a949 (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
# Maintainer: Joseph DiGiovanni <jdigiovanni78 at gmail dot com>

pkgname=icoextract-git
pkgver=r70.31ce309
pkgrel=1
pkgdesc='Icon extractor for Windows PE files (.exe/.dll) with optional thumbnailer functionality'
arch=('any')
url='https://github.com/jlu5/icoextract'
license=('MIT')
depends=('python-pefile')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
optdepends=('python-pillow: required for the optional thumbnailer')
provides=('exe-thumbnailer')
conflicts=('exe-thumbnailer' 'icoextract')
source=("git+https://github.com/jlu5/icoextract.git")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/icoextract"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd icoextract

    python -m build --wheel --no-isolation
}

package() {
    cd icoextract

    python -m installer --destdir="${pkgdir}" dist/*.whl

    install -Dm644 exe-thumbnailer.thumbnailer "${pkgdir}"/usr/share/thumbnailers/exe-thumbnailer.thumbnailer

    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/icoextract/LICENSE
}