aboutsummaryrefslogtreecommitdiffstats
path: root/community/skopeo/APKBUILD
blob: 68330b673f3ae35a3b7849ea0bcb00b5f2b24daa (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=skopeo
pkgver=0.1.32
pkgrel=0
pkgdesc="Work with remote images registries - retrieving information, images, signing content"
url="https://github.com/containers/skopeo"
arch="all"
license="Apache-2.0"
options="!check" # needs docker
makedepends="
	go
	linux-headers
	btrfs-progs-dev
	glib-dev
	gpgme-dev
	lvm2-dev
	ostree-dev
	libselinux-dev
	"
source="skopeo-$pkgver.tar.gz::https://github.com/containers/skopeo/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/containers/$pkgname"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
	default_prepare
}

build() {
	cd "$builddir"
	export GOPATH="$srcdir"
	go build -o bin/$pkgname ./cmd/$pkgname
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/var/lib/atomic/sigstore
	install -Dm755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname
	install -Dm644 "$builddir"/default-policy.json \
		"$pkgdir"/etc/containers/policy.json
	install -Dm644 "$builddir"/default.yaml \
		"$pkgdir"/etc/containers/registries.d/default.yaml
}

sha512sums="c52eeee85aa01448c9742d4e415e3ce6f2e0ef4e26a55758202baecb573ad8e3efb94c762d4c303fb21b896998b32e19f919a7382dfd6b17df2a96d66d07267b  skopeo-0.1.32.tar.gz"