blob: ea108ada066dcf36407eb25f0779a8ad7ec7d2ca (
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
|
# Contributor: Mateusz Kaczanowski <kaczanowski.mateusz@gmail.com>
pkgname='packer-post-processor-flasher-git'
provides=('packer-post-processor-flasher')
pkgver=r8.7856deb
pkgrel=1
pkgdesc="Packer plugin to dump image on physical device"
arch=('x86_64')
url="https://github.com/mkaczanowski/packer-post-processor-flasher"
license=('Apache-2.0')
depends=('glibc' 'multipath-tools')
makedepends=('git' 'go')
source=("git+${url}.git")
md5sums=('SKIP')
pkgver() {
cd "packer-post-processor-flasher"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
build() {
cd "packer-post-processor-flasher"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build
}
package() {
cd "packer-post-processor-flasher"
install -Dm755 packer-post-processor-flasher "${pkgdir}/usr/bin/packer-post-processor-flasher"
}
|