[arch-commits] Commit in (4 files)
Levente Polyak
anthraxx at archlinux.org
Mon Oct 2 20:50:24 UTC 2017
Date: Monday, October 2, 2017 @ 20:50:23
Author: anthraxx
Revision: 261326
addpkg: ruby-titlecase 0.1.1+13+1d6b4f7-1
Added:
ruby-titlecase/
ruby-titlecase/repos/
ruby-titlecase/trunk/
ruby-titlecase/trunk/PKGBUILD
----------+
PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
Added: ruby-titlecase/trunk/PKGBUILD
===================================================================
--- ruby-titlecase/trunk/PKGBUILD (rev 0)
+++ ruby-titlecase/trunk/PKGBUILD 2017-10-02 20:50:23 UTC (rev 261326)
@@ -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=1
+pkgdesc="Ruby version of John Gruber's TitleCase.pl"
+url='https://github.com/samsouder/titlecase'
+arch=('any')
+license=('MIT')
+depends=('ruby')
+makedepends=('git')
+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