summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1e8a2b2a28246080365d172835464259b65948e8 (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
# Maintainer: Mattia Biondi <mattia biondi1 at gmail dot com>

pkgname=deber-git
_pkgname=${pkgname%-git}
pkgver=1.1.1.r4.geba459f
pkgrel=1
pkgdesc="Debian packaging with Docker"
arch=('x86_64')
url="https://github.com/dawidd6/deber"
license=("MIT")
depends=('docker')
makedepends=('git' 'go')
provides=(${_pkgname})
conflicts=(${_pkgname})
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')

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

build() {
	cd "${srcdir}/${pkgname}"
	go build \
		-buildmode=pie \
		-o ${_pkgname}
}

package() {
	cd "${srcdir}/${pkgname}"

	install -Dm755 ${_pkgname} "${pkgdir}/usr/bin/${_pkgname}"
	install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}