summaryrefslogtreecommitdiffstats
path: root/testing/opennebula/APKBUILD
blob: a8d3aa700c7428974e09aa4062af880865a393bb (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=opennebula
pkgver=4.0.1
pkgrel=0
pkgdesc="Virtual management infrastructure as a service (IaaS) toolkit for cloud computing"
url="http://opennebula.org"
arch="all"
license="Apache"
depends="ruby-sqlite ruby-nokogiri ruby-crack ruby-thin ruby-json ruby-sequel
	ruby-mysql2 ruby-rack ruby-sinatra ruby-thin ruby-net-ldap ruby-uuidtools
	ruby-curb ruby-amazon-ec2"
depends_dev="xmlrpc-c-dev sqlite-dev openssl-dev libxml2-dev curl-dev"
makedepends="$depends_dev scons ruby ruby-gems bash util-linux-ng"
install=""
pkgusers=oneadmin
pkggroups=oneadmin
subpackages="$pkgname-dev $pkgname-doc $pkgname-sunstone $pkgname-ozones
	$pkgname-clients $pkgname-node-kvm:node_kvm"
source="http://dev.opennebula.org/packages/opennebula-$pkgver/opennebula-$pkgver.tar.gz
	${pkgname}.initd ${pkgname}.confd"

_builddir="$srcdir"/opennebula-$pkgver

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	scons
}

package() {
	cd "$_builddir"
	DESTDIR="$pkgdir" ./install.sh \
		-u oneadmin -g oneadmin || return 1
        install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname || return 1
}

sunstone() {
	pkgdesc="OpenNubula webinterface"
	depends="ruby-json ruby-rack ruby-sinatra ruby-thin ruby-sequel ruby-nokogiri"
	arch="noarch"
	cd "$_builddir"
	DESTDIR="$subpkgdir" ./install.sh \
		-s -u oneadmin -g oneadmin || return 1
}

ozones() {
	pkgdesc="OpenNebula Zones (OZones)"
	depends="ruby-json ruby-sequel ruby-nokogiri ruby-sqlite ruby-mysql2 ruby-nokogiri"
	arch="noarch"
	cd "$_builddir"
	DESTDIR="$subpkgdir" ./install.sh \
		-o -u oneadmin -g oneadmin || return 1
}

clients() {
	pkgdesc="Client utilities: OpenNebula cli, occi and ec2 client files"
	arch="noarch"
	cd "$_builddir"
	DESTDIR="$subpkgdir" ./install.sh \
		-c -u oneadmin -g oneadmin || return 1
}

node_kvm() {
	pkgdesc="Node dependecies for OpenNebula"
	arch="noarch"
	depends="ruby openssh libvirt qemu-x86_64 libvirt-qemu"
	mkdir -p "$subpkgdir"
}

md5sums="c45537dfb689a357e7300dc5ed996d75  opennebula-4.0.1.tar.gz
ffd98ee7961fd3c7d076ff6da4e33d8c  opennebula.initd
f213d16b6b90115000950618a0640b99  opennebula.confd"
sha256sums="258cb698b732454534c9729d6ee1abe3f43aa480ce5c7ccef477a198f832bf74  opennebula-4.0.1.tar.gz
ed875ccf38c4b2a2ed96b110d00cca7d50d18cee9893e7da88fc0e7704981704  opennebula.initd
cd358620bb8e76fd85e2f5b86d517569c12f0d44ec3440ef80f3a45a665f30db  opennebula.confd"
sha512sums="64ddf4b814e2d37aba9f6425fb7668dbcb6eaff33d2f609601d3738c2f5183a631ab90ed25c41b549b92e7f28d4920298a65d222ef7e8a56d27190a9738fa149  opennebula-4.0.1.tar.gz
e9c2b4b2f7516277d8bd0ec8ce12bfc9d4a172b631fed7b0f977775467eb689e0daa8f487da9c01621d0381f68f8fefa6571002dc43ce8a6129b6a5ff75c74b5  opennebula.initd
77cd2fb0108a5a6665edc0c3e392511e93abf22e31b7ea451a241288572b9b79a997975bb62214dd02be49b406ef42671bacb8a98e6b1aa20dc045df7c2e82fc  opennebula.confd"