summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3859ed91ce06e5a1ab5f8bbbf5aa2aea1ba429b8 (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
# Maintainer: Jonas Witschel <diabonas@archlinux.org>
pkgname=ms-tpm-20-ref-git
pkgver=r181.f640b4b
pkgrel=1
pkgdesc='Reference implementation of the TCG Trusted Platform Module 2.0 specification'
arch=('x86_64')
url='https://github.com/Microsoft/ms-tpm-20-ref'
license=('BSD')
depends=('openssl')
makedepends=('git' 'autoconf-archive')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+$url.git")
sha512sums=('SKIP')

pkgver() {
	cd "${pkgname%-git}"
	printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd "${pkgname%-git}/TPMCmd"
	./bootstrap
}

build() {
	cd "${pkgname%-git}/TPMCmd"
	./configure --prefix=/usr
	make
}

package() {
	cd "${pkgname%-git}/TPMCmd"
	make DESTDIR="$pkgdir" install
	install -Dm644 ../LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}