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/.SRCINFO | 9 +++------ zsteg/.gitignore | 4 ++++ zsteg/PKGBUILD | 59 ++++++++++++++++++++++++++++++++++++++++++++------------ 3 files changed, 54 insertions(+), 18 deletions(-) create mode 100644 zsteg/.gitignore (limited to 'zsteg') diff --git a/zsteg/.SRCINFO b/zsteg/.SRCINFO index 6cca372..74b3fad 100644 --- a/zsteg/.SRCINFO +++ b/zsteg/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = zsteg pkgdesc = detect stegano-hidden data in PNG & BMP - pkgver = 0.2.2 + pkgver = 0.2.10 pkgrel = 1 url = https://github.com/zed-0xff/zsteg arch = any @@ -8,10 +8,7 @@ pkgbase = zsteg depends = ruby depends = ruby-zpng depends = ruby-iostruct - noextract = zsteg-0.2.2.gem - options = !emptydirs - source = https://rubygems.org/downloads/zsteg-0.2.2.gem - sha256sums = f3f6bbaf46e5c9f0598aa8b8f457dad890873e4c4e382f6c22e408fd34958ad7 + source = zsteg.tar.gz::https://github.com/zed-0xff/zsteg/archive/refs/tags/v0.2.10.tar.gz + sha256sums = fed43cbdeeaae7e25b87e7858dee2321b7a527c7686d062a60e5bb92928ebd3f pkgname = zsteg - diff --git a/zsteg/.gitignore b/zsteg/.gitignore new file mode 100644 index 0000000..05c6d4d --- /dev/null +++ b/zsteg/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!.SRCINFO +!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