diff options
author | Joakim Reinert | 2015-08-30 13:56:55 +0200 |
---|---|---|
committer | Joakim Reinert | 2015-08-30 13:56:55 +0200 |
commit | b386a8635983db4769319c01d1b8570ac8b20ecd (patch) | |
tree | 66689d7d5c96e3be8cfed66b75565ff5256d23e3 | |
download | aur-b386a8635983db4769319c01d1b8570ac8b20ecd.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 39 |
2 files changed, 51 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..368c767928b0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = ruby-droplet_ctl-git + pkgver = 0.0.1 + pkgrel = 1 + arch = any + license = MIT + makedepends = rubygems + depends = ruby + source = git://github.com/jreinert/droplet_ctl.git + md5sums = SKIP + +pkgname = ruby-droplet_ctl-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2e083e2c9011 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# This is an example PKGBUILD file. Use this as a start to creating your own, +# and remove these comments. For more information, see 'man PKGBUILD'. +# NOTE: Please fill out the license field for your package! If it is unknown, +# then please put 'unknown'. + +# See http://wiki.archlinux.org/index.php/Ruby_Gem_Package_Guidelines for more +# information on Ruby Gem packaging. + +# Maintainer: Your Name <youremail@domain.com> +_gemname=droplet_ctl +pkgname=ruby-${_gemname}-git +pkgver=0.0.1 +pkgrel=1 +pkgdesc="" +arch=(any) +url="" +license=('MIT') +depends=(ruby) # Full dependency information is available in the yaml specification +makedepends=(rubygems) +source=("git://github.com/jreinert/${_gemname}.git") +md5sums=(SKIP) + +pkgver() { + cd "$srcdir/$_gemname" + ruby -r './lib/droplet_ctl' -e 'puts DropletCtl::VERSION' +} + +package() { + cd "$srcdir/${_gemname}" + # _gemdir is defined inside package() because if ruby[gems] is not installed on + # the system, makepkg will exit with an error when sourcing the PKGBUILD. + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + + gem build ${_gemname}.gemspec + gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" -n "$pkgdir/usr/bin" \ + "$_gemname-$pkgver.gem" +} + +# vim:set ts=2 sw=2 et: |