Date: Tuesday, October 18, 2022 @ 18:16:35
Author: felixonmars
Revision: 1332752
archrelease: copy trunk to community-any
Added:
ruby-unindent/repos/community-any/
ruby-unindent/repos/community-any/PKGBUILD
(from rev 1332751, ruby-unindent/trunk/PKGBUILD)
----------+
PKGBUILD | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
Copied: ruby-unindent/repos/community-any/PKGBUILD (from rev 1332751,
ruby-unindent/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2022-10-18 18:16:35 UTC (rev 1332752)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=ruby-unindent
+pkgver=1.0
+pkgrel=1
+pkgdesc='Ruby method to unindent strings'
+arch=(any)
+url='https://github.com/mynyml/unindent'
+license=(MIT)
+depends=(ruby)
+makedepends=(ruby-nanotest ruby-rake)
+options=(!emptydirs)
+source=(https://github.com/mynyml/unindent/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
+sha256sums=('2d8457406a66d821f458385a51aabd4f77ff19eb53687a38b309d51ab15f080d')
+
+prepare() {
+ cd unindent-$pkgver
+ # https://github.com/mynyml/unindent/pull/2
+ sed -i 's/-rubygems//' Rakefile
+}
+
+build() {
+ local _gemdir="$(gem env gemdir)"
+ cd unindent-$pkgver
+ gem build unindent.gemspec
+ gem install \
+ --local \
+ --verbose \
+ --ignore-dependencies \
+ --no-user-install \
+ --install-dir "tmp_install/$_gemdir" \
+ --bindir "tmp_install/usr/bin" \
+ unindent-$pkgver.gem
+ find "tmp_install/$_gemdir/gems/" \
+ -type f \
+ \( \
+ -iname "*.o" -o \
+ -iname "*.c" -o \
+ -iname "*.so" -o \
+ -iname "*.time" -o \
+ -iname "gem.build_complete" -o \
+ -iname "Makefile" \
+ \) \
+ -delete
+ rm -r tmp_install/$_gemdir/cache
+}
+
+check() {
+ local _gemdir="$(gem env gemdir)"
+ cd unindent-$pkgver
+ GEM_HOME="tmp_install/$_gemdir" rake
+}
+
+package() {
+ cd unindent-$pkgver
+ cp -a tmp_install/* "$pkgdir"/
+ install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}