summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b277deb971bf9ee6dc177dda22167860af3c4e9d (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
# Maintainer: Wei Li <liwei@anbutu.com>
pkgname=hyperstart-git
pkgver=v1.0.0.r21.59abb74
pkgrel=1
pkgdesc="The tiny Init service for HyperContainer"
arch=('any')
url="https://github.com/hyperhq/hyperstart"
license=('Apache')
depends=('hyperd')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname%-git}::git+${url}.git")
md5sums=('SKIP')

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

build() {
	cd "$srcdir/${pkgname%-git}"
	./autogen.sh
	./configure --prefix=/usr
	make
}
 
package() {
	cd "$srcdir/${pkgname%-git}"
	install -m755 -d "${pkgdir}/var/lib/hyper"
	install -m644 build/hyper-initrd.img	"${pkgdir}/var/lib/hyper/hyper-initrd.img"
	install -m644 build/arch/x86_64/kernel	"${pkgdir}/var/lib/hyper/kernel"
}