aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opennebula/APKBUILD
blob: 6d1a5fc94f3c4391264ccb3c652ba6b4d7560684 (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.9.80
pkgrel=1
pkgdesc="Virtual management infrastructure as a service (IaaS) toolkit for cloud computing"
url="http://opennebula.org"
arch="all"
license="Apache"
depends="ruby-json ruby-sequel ruby-nokogiri ruby-sqlite ruby-mysql2 ruby-nokogiri
	ruby-rack14 ruby-sinatra ruby-thin ruby-crack ruby-thin ruby-net-ldap
	ruby-uuidtools ruby-curb ruby-amazon-ec2 ruby-io-console bash
	curl wget"
depends_dev="xmlrpc-c-dev sqlite-dev openssl-dev libxml2-dev curl-dev"
makedepends="$depends_dev scons ruby bash"
install="opennebula.pre-install"
pkgusers=oneadmin
pkggroups=oneadmin
subpackages="$pkgname-dev $pkgname-doc $pkgname-node-kvm:node_kvm"
source="http://downloads.opennebula.org/packages/opennebula-$pkgver/opennebula-$pkgver.tar.gz
	opennebula.initd
	opennebula.confd
	getopt.patch
	ssh.config
	one_auth"

_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 -j${JOBS:-2} || return 1
}

package() {
	cd "$_builddir"
	DESTDIR="$pkgdir" ./install.sh \
		-u $pkgusers -g $pkggroups || 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
	install -o $pkgusers -g $pkggroups -d \
		"$pkgdir"/var/lib/one/.ssh \
		"$pkgdir"/var/lib/one/.one || return 1
	install -m600 -o $pkgusers -g $pkggroups -D \
		"$srcdir"/ssh.config \
		"$pkgdir"/var/lib/one/.ssh/config || return 1
	install -m600 -o $pkgusers -g $pkggroups -D \
		"$srcdir"/one_auth \
		"$pkgdir"/var/lib/one/.one/one_auth || return 1
	# set the default emulator
	echo -e "\nEMULATOR = /usr/bin/qemu-system-x86_64" >> \
		"$pkgdir"/etc/one/vmm_exec/vmm_exec_kvm.conf || return 1
}

node_kvm() {
	pkgdesc="KVM node for OpenNebula"
	arch="noarch"
	install="opennebula-node-kvm.pre-install"
	depends="ruby openssh qemu-x86_64 libvirt-qemu procps bash"
	mkdir -p "$subpkgdir"
}

md5sums="43ef6a658b5ae121ad4461178abdbd88  opennebula-4.9.80.tar.gz
44ecaf28b2f0293d55aa401e0ec49948  opennebula.initd
0b9c5ef240d1cb13d35b21c081e756ad  opennebula.confd
8f1a346b4020b7c3e2853f42cc38d35b  getopt.patch
37b82927bd6b0c1dd9cbde2a3728e719  ssh.config
3ae86352df192e0aae9fdee58532610e  one_auth"
sha256sums="8e69dedd69001bce6d224661649bc3f5b1608bf87e69dd1ac5ff1e774745a3c9  opennebula-4.9.80.tar.gz
20ea2103ccd37988c1426a7e39f37c9923465e1769cc3669dc47751876f3266a  opennebula.initd
296d445dfaee90c114a5cd8ecb208c495a3a22dabde13ec9ece623368f5627a1  opennebula.confd
072ad62b3ef18eb3c9d33b47acb7a867d076c3083ce561bdbffcf98bb852d663  getopt.patch
e934a2b5083a04126e5948a6abf1adfa8e557bb086010453824b44282dafdc8b  ssh.config
4af1f964af87ed62f2b953e8b0269b2ad8dfbcba57b5eebddcb9e8f0cc4379da  one_auth"
sha512sums="54aff34770a29262a4e3ef886957044489f4d4b1905e847522adff6ad1012df21e9c2caa46bc060fbbbb9d1ce23cb41768f28ca90af5c4e5844b054c0d0d7349  opennebula-4.9.80.tar.gz
2b87e93bce79325ecd57be053e08cc626bdec2bfd9048635452957efc88e5104cbbf74d3c2757e3e42738276b7bd37db2c9845e85570b7ff5f27117dad1d06e2  opennebula.initd
0b5c98642a74a804e36729f0a0abb5434a55ecaa5a9c29620f8940ba69b141f47fa1693a63bc22298e735bba61d3f0b15c82278b5d8071eeb19f02398332f6ae  opennebula.confd
7f39da47a89011bd368217bc7cb33a1647b49d43960bf47f22b742dfa109d04e9b18ad0827d5d3b4c05bd6b31d723322b9c899520fbb2db5b4217a38bab9eefe  getopt.patch
9da0adff52401e5bd50b25a0ec240e781257330f9084c55c6ca741c9179c29681ee6855bc3607d05949124559828f6fdd029b3ea01b881f472292c96489c64cf  ssh.config
8aaab56ae8c8bf7d1c06a47f4f3339c9e62486270b9ab00751dd21fabee19824f05b20b3d979741886539570e761fd3227acd5ef55a04a9273f0b706f93c813f  one_auth"