# Contributor: Carlo Landmeter # Maintainer: pkgname=opennebula pkgver=4.0.1 pkgrel=4 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 ruby-gems bash" depends_dev="xmlrpc-c-dev sqlite-dev openssl-dev libxml2-dev curl-dev" makedepends="$depends_dev scons ruby ruby-gems bash" install="opennebula.pre-install" pkgusers=oneadmin pkggroups=oneadmin subpackages="$pkgname-dev $pkgname-doc $pkgname-node-kvm:node_kvm" source="http://dev.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 } 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 } 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 44ecaf28b2f0293d55aa401e0ec49948 opennebula.initd 0b9c5ef240d1cb13d35b21c081e756ad opennebula.confd 8f1a346b4020b7c3e2853f42cc38d35b getopt.patch 37b82927bd6b0c1dd9cbde2a3728e719 ssh.config 3ae86352df192e0aae9fdee58532610e one_auth" sha256sums="258cb698b732454534c9729d6ee1abe3f43aa480ce5c7ccef477a198f832bf74 opennebula-4.0.1.tar.gz 20ea2103ccd37988c1426a7e39f37c9923465e1769cc3669dc47751876f3266a opennebula.initd 296d445dfaee90c114a5cd8ecb208c495a3a22dabde13ec9ece623368f5627a1 opennebula.confd 072ad62b3ef18eb3c9d33b47acb7a867d076c3083ce561bdbffcf98bb852d663 getopt.patch e934a2b5083a04126e5948a6abf1adfa8e557bb086010453824b44282dafdc8b ssh.config 4af1f964af87ed62f2b953e8b0269b2ad8dfbcba57b5eebddcb9e8f0cc4379da one_auth" sha512sums="64ddf4b814e2d37aba9f6425fb7668dbcb6eaff33d2f609601d3738c2f5183a631ab90ed25c41b549b92e7f28d4920298a65d222ef7e8a56d27190a9738fa149 opennebula-4.0.1.tar.gz 2b87e93bce79325ecd57be053e08cc626bdec2bfd9048635452957efc88e5104cbbf74d3c2757e3e42738276b7bd37db2c9845e85570b7ff5f27117dad1d06e2 opennebula.initd 0b5c98642a74a804e36729f0a0abb5434a55ecaa5a9c29620f8940ba69b141f47fa1693a63bc22298e735bba61d3f0b15c82278b5d8071eeb19f02398332f6ae opennebula.confd 7f39da47a89011bd368217bc7cb33a1647b49d43960bf47f22b742dfa109d04e9b18ad0827d5d3b4c05bd6b31d723322b9c899520fbb2db5b4217a38bab9eefe getopt.patch 9da0adff52401e5bd50b25a0ec240e781257330f9084c55c6ca741c9179c29681ee6855bc3607d05949124559828f6fdd029b3ea01b881f472292c96489c64cf ssh.config 8aaab56ae8c8bf7d1c06a47f4f3339c9e62486270b9ab00751dd21fabee19824f05b20b3d979741886539570e761fd3227acd5ef55a04a9273f0b706f93c813f one_auth"