[arch-commits] Commit in ruby-rugged/trunk (PKGBUILD)
David Runge
dvzrv at archlinux.org
Sun Jun 9 13:47:02 UTC 2019
Date: Sunday, June 9, 2019 @ 13:47:01
Author: dvzrv
Revision: 478922
upgpkg: ruby-rugged 0.28.0-1
Upgrading to 0.28.0. Rebuilding against libgit2 0.28.2. Adding libgit2 sources, so tests can be run against its fixtures/resources.
> Adding links to upstream bugs for all modifications. Fixing test relying on user's global git config. Removing vendor directory from package as well.
Modified:
ruby-rugged/trunk/PKGBUILD
----------+
PKGBUILD | 35 ++++++++++++++++++++++++-----------
1 file changed, 24 insertions(+), 11 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-06-09 13:37:50 UTC (rev 478921)
+++ PKGBUILD 2019-06-09 13:47:01 UTC (rev 478922)
@@ -3,8 +3,9 @@
# Contributor: Andy Weidenbaum <archbaum at gmail.com>
_name=rugged
+_libgit2_pkgver=0.28.2
pkgname=ruby-rugged
-pkgver=0.27.5
+pkgver=0.28.0
pkgrel=1
pkgdesc='A Ruby binding to the libgit2 linkable library'
arch=('x86_64')
@@ -14,15 +15,22 @@
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")
-sha512sums=('9c2b24aa7c3e193124fa11ecde9eb0e894a4be4edb4bc8c542ea528e735dc417ec4e6eae63e2eac2996f74e95bf613974c3c2db361213b31c157584907ad0e28')
+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=('af285b2690b3650b184403a8175d09fb33371e27f4fcc81a7106eb54224a74554717f24d507324abd7b5151d48a3227dee1e593d00dbd861c372cb65267c6725'
+ '0879c162e2e1dc00eadfbda22cd1f9d3a95b4ec2b653c108983f37c2f695140882de4d50d7cbc04ced247125a4e9fe6df16130e1267891aecdb2411d920db5c6')
prepare() {
mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}"
cd ${pkgname}-${pkgver}
- sed -r 's|~>|>=|g' -i ${_name}.gemspec # don't give a fuck about rubys bla bla
- # remove broken and useless libgit2 "version check"
- sed '47,67d' -i ext/rugged/extconf.rb
+ # 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() {
@@ -35,10 +43,13 @@
}
# we're missing the fixtures from libgit2 to run the tests
-#check(){
-# cd "${pkgname}-${pkgver}"
-# rake test
-#}
+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}
@@ -52,7 +63,9 @@
-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}
+ extensions/*/*/${_name}-${pkgver}/{mkmf.log,gem_make.out} \
+ gems/${_name}-${pkgver}/vendor
}
More information about the arch-commits
mailing list