[arch-commits] Commit in ruby-titlecase/repos (2 files)

Felix Yan felixonmars at archlinux.org
Mon Jan 7 01:27:44 UTC 2019


    Date: Monday, January 7, 2019 @ 01:27:44
  Author: felixonmars
Revision: 420896

archrelease: copy trunk to community-staging-any

Added:
  ruby-titlecase/repos/community-staging-any/
  ruby-titlecase/repos/community-staging-any/PKGBUILD
    (from rev 420894, ruby-titlecase/trunk/PKGBUILD)

----------+
 PKGBUILD |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

Copied: ruby-titlecase/repos/community-staging-any/PKGBUILD (from rev 420894, ruby-titlecase/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2019-01-07 01:27:44 UTC (rev 420896)
@@ -0,0 +1,47 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+_gemname=titlecase
+pkgname=ruby-titlecase
+_gitcommit=1d6b4f760ae753440db4e7ccf0e0ddba621bf25f
+pkgver=0.1.1+13+1d6b4f7
+pkgrel=3
+pkgdesc="Ruby version of John Gruber's TitleCase.pl"
+url='https://github.com/samsouder/titlecase'
+arch=('any')
+license=('MIT')
+depends=('ruby')
+makedepends=('git' 'ruby-rdoc')
+options=('!emptydirs')
+source=(${pkgname}::"git+https://github.com/samsouder/titlecase#commit=${_gitcommit}")
+sha512sums=('SKIP')
+
+pkgver() {
+  cd ${pkgname}
+  printf "%s+%s+%s" \
+    "$(grep version ${_gemname}.gemspec|sed -r 's/.+s.version = "(.+)"/\1/')" \
+    "$(git rev-list --count HEAD)" \
+    "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+  cd ${pkgname}
+  sed -r 's|~>|>=|g' -i ${_gemname}.gemspec # don't give a fuck about rubys bla bla
+  sed 's|git ls-files|find|' -i ${_gemname}.gemspec
+}
+
+build() {
+  cd ${pkgname}
+  gem build ${_gemname}.gemspec
+}
+
+package() {
+  cd ${pkgname}
+  local _gemdir="$(gem env gemdir)"
+  local _gemver="$(grep version ${_gemname}.gemspec|sed -r 's/.+s.version = "(.+)"/\1/')"
+  gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${_gemver}.gem
+  install -Dm 644 README -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 README -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${_gemver}.gem"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list