diff options
-rw-r--r-- | .SRCINFO | 43 | ||||
-rw-r--r-- | Gemfile | 6 | ||||
-rw-r--r-- | Gemfile.lock | 21 | ||||
-rw-r--r-- | PKGBUILD | 78 |
4 files changed, 148 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b86c06fb3d22 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,43 @@ +pkgbase = opennebula-tools + pkgdesc = Command-line tools for OpenNebula Cloud + pkgver = 5.10.3 + pkgrel = 1 + url = https://opennebula.org/ + arch = i686 + arch = x86_64 + license = Apache + makedepends = ruby-bundler + depends = ruby + depends = less + conflicts = opennebula + conflicts = opennebula-unstable + backup = etc/one/cli/oneacct.yaml + backup = etc/one/cli/oneacl.yaml + backup = etc/one/cli/onecluster.yaml + backup = etc/one/cli/onedatastore.yaml + backup = etc/one/cli/onegroup.yaml + backup = etc/one/cli/onehook.yaml + backup = etc/one/cli/onehost.yaml + backup = etc/one/cli/oneimage.yaml + backup = etc/one/cli/onemarket.yaml + backup = etc/one/cli/onemarketapp.yaml + backup = etc/one/cli/onesecgroup.yaml + backup = etc/one/cli/oneshowback.yaml + backup = etc/one/cli/onetemplate.yaml + backup = etc/one/cli/oneuser.yaml + backup = etc/one/cli/onevdc.yaml + backup = etc/one/cli/onevm.yaml + backup = etc/one/cli/onevmgroup.yaml + backup = etc/one/cli/onevnet.yaml + backup = etc/one/cli/onevntemplate.yaml + backup = etc/one/cli/onevrouter.yaml + backup = etc/one/cli/onezone.yaml + source = https://github.com/OpenNebula/one/archive/release-5.10.3.tar.gz + source = Gemfile + source = Gemfile.lock + md5sums = 63a0c34c039f06ba99fbf98f6a8045b4 + md5sums = cabab3dc76285c5f302c982deff89d11 + md5sums = ab3c3bd10dd2c07f9d06a9e755fcf171 + +pkgname = opennebula-tools + diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000000..4976036ce1c5 --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' + +gem 'nokogiri' +gem 'public_suffix' +gem 'rack' +gem 'xmlrpc' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000000..f5635b4a2034 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,21 @@ +GEM + remote: https://rubygems.org/ + specs: + mini_portile2 (2.4.0) + nokogiri (1.10.9) + mini_portile2 (~> 2.4.0) + public_suffix (4.0.3) + rack (2.2.2) + xmlrpc (0.3.0) + +PLATFORMS + ruby + +DEPENDENCIES + nokogiri + public_suffix + rack + xmlrpc + +BUNDLED WITH + 2.1.4 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c252155fcb5a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,78 @@ +# Maintainer: kvaps <kvapss@gmail.com> + +pkgname=opennebula-tools +pkgver=5.10.3 +pkgrel=1 +pkgdesc="Command-line tools for OpenNebula Cloud" +arch=('i686' 'x86_64') +url='https://opennebula.org/' +license=('Apache') +depends=( + 'ruby' + 'less' +) +makedepends=('ruby-bundler') +conflicts=( + 'opennebula' + 'opennebula-unstable' +) +backup=( + 'etc/one/cli/oneacct.yaml' + 'etc/one/cli/oneacl.yaml' + 'etc/one/cli/onecluster.yaml' + 'etc/one/cli/onedatastore.yaml' + 'etc/one/cli/onegroup.yaml' + 'etc/one/cli/onehook.yaml' + 'etc/one/cli/onehost.yaml' + 'etc/one/cli/oneimage.yaml' + 'etc/one/cli/onemarket.yaml' + 'etc/one/cli/onemarketapp.yaml' + 'etc/one/cli/onesecgroup.yaml' + 'etc/one/cli/oneshowback.yaml' + 'etc/one/cli/onetemplate.yaml' + 'etc/one/cli/oneuser.yaml' + 'etc/one/cli/onevdc.yaml' + 'etc/one/cli/onevm.yaml' + 'etc/one/cli/onevmgroup.yaml' + 'etc/one/cli/onevnet.yaml' + 'etc/one/cli/onevntemplate.yaml' + 'etc/one/cli/onevrouter.yaml' + 'etc/one/cli/onezone.yaml' +) +source=( + "https://github.com/OpenNebula/one/archive/release-${pkgver}.tar.gz" + 'Gemfile' + 'Gemfile.lock' +) +md5sums=( + '63a0c34c039f06ba99fbf98f6a8045b4' # package + 'cabab3dc76285c5f302c982deff89d11' # Gemfile + 'ab3c3bd10dd2c07f9d06a9e755fcf171' # Gemfile.lock +) + +build() { + bundle config --local deployment true + bundle config --local path ${srcdir} + bundle install +} + +package() { + # Install gems + install -m 0755 -d "${pkgdir}/usr/share/one/gems" + find ${srcdir}/ruby -mindepth 2 -maxdepth 2 -exec cp -r "{}" "${pkgdir}/usr/share/one/gems/" \; + + # Install configs + install -m 0755 -d "${pkgdir}/etc/one/cli" + find "${srcdir}/one-release-${pkgver}/src/cli/etc" -mindepth 1 -maxdepth 1 -type f -exec install -D -m644 "{}" "${pkgdir}/etc/one/cli/" \; + + # Install binaries + install -m 0755 -d "${pkgdir}/usr/bin" + find "${srcdir}/one-release-${pkgver}/src/cli" -mindepth 1 -maxdepth 1 -executable -type f -exec install -m755 "{}" "${pkgdir}/usr/bin/" \; + + # Install helpers + install -m 0755 -d "${pkgdir}/usr/lib/one/ruby/cli/one_helper" + install -D -m 644 "${srcdir}/one-release-${pkgver}/src/cli/cli_helper.rb" "${pkgdir}/usr/lib/one/ruby/cli/cli_helper.rb" + install -D -m 644 "${srcdir}/one-release-${pkgver}/src/cli/command_parser.rb" "${pkgdir}/usr/lib/one/ruby/cli/command_parser.rb" + install -D -m 644 "${srcdir}/one-release-${pkgver}/src/cli/one_helper.rb" "${pkgdir}/usr/lib/one/ruby/cli/one_helper.rb" + find "${srcdir}/one-release-${pkgver}/src/cli/one_helper" -mindepth 1 -maxdepth 1 -type f -exec install -m644 "{}" "${pkgdir}/usr/lib/one/ruby/cli/one_helper/" \; +} |