summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d18465f3fa67c4cbe17182da4471e7d7c447f6d8 (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
# Maintainer: Pieter Joost <pj@born2code.net>
pkgname=imgdiff
pkgver=1.0.2
pkgrel=1
url="https://github.com/n7olkachev/${pkgname}"
pkgdesc="Faster than the fastest in the world pixel-by-pixel image difference tool."
arch=('i686' 'x86_64')
license=('MIT')
makedepends=(
	'go'
	'git'
)
source=("${url}/archive/v${pkgver}.tar.gz")
md5sums=('4b7ff75cd7d1ac9f19828e93c132bc7a')

build() {
	cd "$srcdir/$pkgname-$pkgver"

	go build \
		-o $pkgname \
    -trimpath \
    -buildmode=pie \
    -mod=readonly \
    -modcacherw \
    -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
    ./cmd
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
	# license file not in release yet
	#install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}