diff options
author | Dan Theisen <djt@hxx.in> | 2019-05-02 11:20:03 +0000 |
---|---|---|
committer | Dan Theisen <djt@hxx.in> | 2019-05-03 11:26:25 +0000 |
commit | cb46a19d8e41135f695146987ceb4efcc7cc1a6a (patch) | |
tree | 09ac1421dfe536d5cec52f5b2d4fbf0c2552000f /user/ruby-diff-lcs/APKBUILD | |
parent | 60d9c9d4a9d9a121728cd07ffb081bc4702c964a (diff) | |
download | packages-cb46a19d8e41135f695146987ceb4efcc7cc1a6a.tar.gz packages-cb46a19d8e41135f695146987ceb4efcc7cc1a6a.tar.bz2 packages-cb46a19d8e41135f695146987ceb4efcc7cc1a6a.tar.xz packages-cb46a19d8e41135f695146987ceb4efcc7cc1a6a.zip |
user/ruby-diff-lcs: new package
Diffstat (limited to 'user/ruby-diff-lcs/APKBUILD')
-rw-r--r-- | user/ruby-diff-lcs/APKBUILD | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/user/ruby-diff-lcs/APKBUILD b/user/ruby-diff-lcs/APKBUILD new file mode 100644 index 000000000..c6f163ada --- /dev/null +++ b/user/ruby-diff-lcs/APKBUILD @@ -0,0 +1,50 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Dan Theisen <djt@hxx.in> +pkgname=ruby-diff-lcs +_gemname=${pkgname#ruby-} +pkgver=1.3 +pkgrel=1 +pkgdesc="Generate difference sets between Ruby sequences" +url="http://halostatue.github.io/diff-lcs/" +arch="noarch" +options="!check" # to avoid cyclic dependency with rspec +license="MIT" +depends="ruby" +subpackages="$pkgname-tools" +source="$pkgname-$pkgver.tar.gz::https://github.com/halostatue/$_gemname/archive/v$pkgver.tar.gz" +builddir="$srcdir/$_gemname-$pkgver" + +build() { + cd "$builddir" + gem build $_gemname.gemspec +} + +package() { + local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" + local geminstdir="$gemdir/gems/$_gemname-$pkgver" + + cd "$builddir" + gem install --local \ + --install-dir "$gemdir" \ + --bindir "$pkgdir/usr/bin" \ + --ignore-dependencies \ + --no-document \ + --verbose \ + $_gemname + + # Remove unnecessary files. + cd "$gemdir" + rm -r cache/ build_info/ doc/ + cd "$geminstdir" + rm -r autotest/ docs/ spec/ Rakefile *.md *.rdoc *.txt +} + +tools() { + pkgdesc="$pkgdesc (CLI tools)" + depends="$pkgname=$pkgver-r$pkgrel" + + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/ +} + +sha512sums="b455f86ab006cbb823c2f8ed7fcde16c432e3783b6408ec305e57b7f4d0cf98bad586786947414ec3dc27e885b1485e534d26df19eaa9972874d78a8829b501e ruby-diff-lcs-1.3.tar.gz" |