[arch-commits] Commit in ruby-rugged/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Thu Dec 26 00:36:34 UTC 2019
Date: Thursday, December 26, 2019 @ 00:36:33
Author: felixonmars
Revision: 541651
archrelease: copy trunk to community-staging-x86_64
Added:
ruby-rugged/repos/community-staging-x86_64/
ruby-rugged/repos/community-staging-x86_64/PKGBUILD
(from rev 541648, ruby-rugged/trunk/PKGBUILD)
----------+
PKGBUILD | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
Copied: ruby-rugged/repos/community-staging-x86_64/PKGBUILD (from rev 541648, ruby-rugged/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2019-12-26 00:36:33 UTC (rev 541651)
@@ -0,0 +1,71 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# Contributor: ChaosKid42 <christoph.scholz at gmail.com>
+# Contributor: Andy Weidenbaum <archbaum at gmail.com>
+
+_name=rugged
+# ideally this should match $pkgver, as package() might fail otherwise. thanks, github
+_libgit2_pkgver=0.28.4
+pkgname=ruby-rugged
+pkgver=0.28.4.1
+pkgrel=2
+pkgdesc='A Ruby binding to the libgit2 linkable library'
+arch=('x86_64')
+url="https://github.com/libgit2/rugged"
+license=('MIT')
+depends=('ruby' 'libgit2')
+makedepends=('ruby-minitest' 'ruby-rake' 'ruby-rake-compiler' 'ruby-rdoc')
+checkdepends=('git')
+options=(!emptydirs)
+source=("${_name}-${pkgver}.tar.gz::https://github.com/libgit2/${_name}/archive/v${pkgver}.tar.gz"
+ "libgit2-${_libgit2_pkgver}.tar.gz::https://github.com/libgit2/libgit2/archive/v${_libgit2_pkgver}.tar.gz")
+sha512sums=('4a4d1729dcad510a735d97e3eae75496f1d09cbf6c7836dcc0f98e6ca9b5e60a0d848cf6d4ff9b7372a5f10d3d8ced7aad5de6510910ce6193ade94a5f940247'
+ 'b81160608003b25d9b922d259ebbbbf941b6bd5100fa1875497c8cd29de320e292fff568c757a7a85b2b3044ddc1cb92c74dbcb13d630d62ecf9a8559b619d15')
+
+prepare() {
+ mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
+ # we don't do version pinning
+ sed -r 's|~>|>=|g' -i ${_name}.gemspec
+ # remove broken and useless libgit2 "version check":
+ # https://github.com/libgit2/rugged/issues/698
+ sed '68,88d' -i ext/rugged/extconf.rb
+ # source tarball doesn't include vendored libgit2 version, which is only
+ # needed for test fixtures (resources): https://github.com/libgit2/rugged/issues/801
+ mv -v ../libgit2-${_libgit2_pkgver}/* vendor/libgit2
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ export CI_BUILD=true
+ export RUGGED_USE_SYSTEM_LIBRARIES=true
+ export CMAKE_FLAGS=" --use-system-libraries"
+ rake compile
+ rake gem
+}
+
+check(){
+ cd "${pkgname}-${pkgver}"
+ # ConfigTest#test_read_global_config_file fails, if no gitconfig is set for user...
+ # https://github.com/libgit2/rugged/issues/432
+ git config --global user.name "Foo Bar"
+ rake test
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ local _gemdir="$(gem env gemdir)"
+ gem install --ignore-dependencies \
+ --no-user-install \
+ -i "${pkgdir}/${_gemdir}" \
+ -n "${pkgdir}/usr/bin" \
+ pkg/${_name}-${pkgver}.gem
+ install -vDm 644 "$pkgdir/$_gemdir/gems/$_name-$pkgver/LICENSE" \
+ -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+ install -vDm 644 README.md CHANGELOG.md -t \
+ "${pkgdir}/usr/share/doc/${pkgname}"
+ # removing all unneeded stuff
+ cd "${pkgdir}/${_gemdir}"
+ rm -rv cache gems/${_name}-${pkgver}/{ext,lib/*/*.so} \
+ extensions/*/*/${_name}-${pkgver}/{mkmf.log,gem_make.out} \
+ gems/${_name}-${pkgver}/vendor
+}
More information about the arch-commits
mailing list