aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sbsigntool/APKBUILD
blob: 981b5401a8373f8e81c23188099220fd11af30bb (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
52
53
54
55
56
57
58
59
60
61
# Contributor: Tero Hilpinen <tero.hilpinen@symbio.com>
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>

pkgname=sbsigntool
pkgver=0.8
pkgrel=1
_ccancommit=261b10869ddbb4ac650ef8886c5052b1a8dbeecd
pkgdesc="Secure Boot signing tools"
url="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git/"
arch="x86_64"
license="GPL"
depends=""
makedepends="autoconf automake bash binutils-dev gnu-efi-dev help2man libressl-dev util-linux-dev"
options="!check"	# testsuite is not functional
install=""
subpackages="$pkgname-doc"
source="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git/snapshot/sbsigntools-$pkgver.tar.gz
	ccan-$_ccancommit.tar.gz::http://git.ozlabs.org/?p=ccan;a=snapshot;h=$_ccancommit;sf=tgz
	0001-fix-autogen.patch
	"
builddir="$srcdir/sbsigntools-$pkgver"

prepare() {
	default_prepare
	cd "$builddir"
	rm -rf "$builddir"/lib/ccan.git "$builddir"/lib/ccan
	ln -s ../../ccan-$(echo $_ccancommit | cut -b -7) "$builddir"/lib/ccan.git

	# fix ccan for musl and to work outside git checkout
	sed -i -e 's,sys/unistd.h,unistd.h,g' "$builddir"/lib/ccan.git/ccan/opt/usage.c
	sed -i -e 's,--git-only "$module_dir","$module_srcdir",g' "$builddir"/lib/ccan.git/tools/create-ccan-tree

	# autogen.sh is missing 'list', instantiate ccan here
        lib/ccan.git/tools/create-ccan-tree \
                --build-type=automake lib/ccan \
		"talloc read_write_all build_assert array_size endian list"

	./autogen.sh
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="b6ab1e1e8aca6be7a560156b80b643e697467f5a45bd29dc30dba12b445755a938bcc803e7199eb9bf0fa033d31d2392360116377f9ac939c1c939e5d95023e4  sbsigntools-0.8.tar.gz
730c70cf88cfbf23796053aa689e419f433285c7fec7a6f4b5cf13efead12f99752db70790ff321da374180e3178aed105ce5bd3f66daadf545ef9b5bb02f6cd  ccan-261b10869ddbb4ac650ef8886c5052b1a8dbeecd.tar.gz
9bf0a12c7735d09e1562ad901676a7ca9572265abee88580d4f830723a28423062d5b77fe02f21414884aeb046e84cf09da599754eafaad660c5938469c460a9  0001-fix-autogen.patch"