From 90bb8b2468e26f4bbb495f2798c0e7d5b3a63c24 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 11 Aug 2022 18:11:10 +0300 Subject: zsteg: Update to v0.2.10 --- zsteg/PKGBUILD | 59 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 12 deletions(-) (limited to 'zsteg/PKGBUILD') diff --git a/zsteg/PKGBUILD b/zsteg/PKGBUILD index 1a49d80..d36cdee 100644 --- a/zsteg/PKGBUILD +++ b/zsteg/PKGBUILD @@ -1,22 +1,57 @@ -# Maintainer: gryffyn +# Maintainer: Yigit Sever +# Contributor: gryffyn -_gemname=zsteg -pkgname=$_gemname -pkgver=0.2.2 +pkgname=zsteg +pkgver=0.2.10 pkgrel=1 pkgdesc="detect stegano-hidden data in PNG & BMP" arch=(any) url='https://github.com/zed-0xff/zsteg' license=(MIT) depends=('ruby' 'ruby-zpng' 'ruby-iostruct') -options=(!emptydirs) -source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem") -noextract=($_gemname-$pkgver.gem) -sha256sums=('f3f6bbaf46e5c9f0598aa8b8f457dad890873e4c4e382f6c22e408fd34958ad7') +source=("${pkgname}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") +sha256sums=('fed43cbdeeaae7e25b87e7858dee2321b7a527c7686d062a60e5bb92928ebd3f') + +build() { + cd "$pkgname-$pkgver" + gem build "$pkgname.gemspec" +} package() { - local _gemdir="$(ruby -rrubygems -e'puts Gem.default_dir')" - install -d -m 755 ${pkgdir}/usr/bin - gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" "$_gemname-$pkgver.gem" - rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem" + local _gemdir="$(gem env gemdir)" + + cd "$pkgname-$pkgver" + gem install \ + --local \ + --ignore-dependencies \ + --no-user-install \ + --install-dir "$pkgdir/$_gemdir" \ + --bindir "$pkgdir/usr/bin" \ + "$pkgname-$pkgver.gem" + + # remove unrepreducible files + rm -frv \ + "$pkgdir/$_gemdir/cache/" \ + "$pkgdir/$_gemdir/gems/$pkgname-$pkgver/vendor/" \ + "$pkgdir/$_gemdir/doc/$pkgname-$pkgver/ri/ext/" + + find "$pkgdir/$_gemdir/gems/" \ + -type f \ + \( \ + -iname "*.o" -o \ + -iname "*.c" -o \ + -iname "*.so" -o \ + -iname "*.time" -o \ + -iname "gem.build_complete" -o \ + -iname "Makefile" \ + \) \ + -delete + + find "$pkgdir/$_gemdir/extensions/" \ + -type f \ + \( \ + -iname "mkmf.log" -o \ + -iname "gem_make.out" \ + \) \ + -delete } -- cgit v1.2.3-70-g09d2