summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 523ff71dfd3d92363e2e53797618a05ee929949e (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
# Maintainer: Donnie Bishop <donnie.a.bishop@gmail.com>

pkgname=legofy-git
pkgver=r188.004d111
pkgrel=1
pkgdesc="Make images look as if they are made out of 1x1 LEGO blocks"
arch=('any')
url="https://github.com/JuanPotato/Legofy"
license=('MIT')
depends=('python-pillow' 'python-click')
makedepends=('git' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel')
provides=("legofy")
conflicts=("legofy")
options=(!emptydirs)
source=("$pkgname::git+${url}")
md5sums=('SKIP')

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

build() {
    cd "$pkgname"
    python -m build --wheel --no-isolation
}

package() {
    cd "$pkgname"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}