diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | haiti.install | 11 |
3 files changed, 23 insertions, 54 deletions
@@ -1,18 +1,19 @@ pkgbase = haiti - pkgdesc = A CLI tool to identify the hash type of a given hash. - pkgver = 0.0.1 + pkgdesc = A CLI tool to identify the hash type of a given hash + pkgver = 1.0.0 pkgrel = 1 url = https://orange-cyberdefense.github.io/haiti/ - install = haiti.install arch = any license = MIT depends = ruby - depends = ruby-bundler - depends = libxslt + depends = ruby-paint + depends = ruby-docopt provides = haiti conflicts = haiti-git - source = https://github.com/Orange-Cyberdefense/haiti/archive/v0.0.1.tar.gz - sha512sums = d91cad845d36f3dc1f877ecc789fe9d86a06939d5941b0927c303b67bb5dcc28780004cab98b8fccfde496afb74ef4d5cd28cb86132f3fd385df3c838c70320e + noextract = haiti-hash-1.0.0.gem + options = !emptydirs + source = https://rubygems.org/downloads/haiti-hash-1.0.0.gem + b2sums = 84006e0300e13adc13e74888f4fe7e40fd31cdd6dd413eede32be58a0455a650060da9d7b2f3219388bddfc22420485124e28bf54e968d70e03eb3fbd783a4a0 pkgname = haiti @@ -1,48 +1,27 @@ # Maintainer: noraj <printf %s 'YWxleGFuZHJlLnphbm5pQGV1cm9wZS5jb20='|base64 -d> +_gemname=haiti-hash pkgname=haiti -pkgver=0.0.1 +pkgver=1.0.0 pkgrel=1 -pkgdesc='A CLI tool to identify the hash type of a given hash.' +pkgdesc='A CLI tool to identify the hash type of a given hash' arch=('any') url='https://orange-cyberdefense.github.io/haiti/' license=('MIT') -depends=('ruby' 'ruby-bundler' 'libxslt') +depends=('ruby' 'ruby-paint' 'ruby-docopt') conflicts=('haiti-git') provides=('haiti') -source=("https://github.com/Orange-Cyberdefense/$pkgname/archive/v$pkgver.tar.gz") -sha512sums=('d91cad845d36f3dc1f877ecc789fe9d86a06939d5941b0927c303b67bb5dcc28780004cab98b8fccfde496afb74ef4d5cd28cb86132f3fd385df3c838c70320e') -install="$pkgname.install" +options=(!emptydirs) +source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem) +#source=("https://github.com/Orange-Cyberdefense/$pkgname/archive/v$pkgver.tar.gz") +noextract=($_gemname-$pkgver.gem) +b2sums=('84006e0300e13adc13e74888f4fe7e40fd31cdd6dd413eede32be58a0455a650060da9d7b2f3219388bddfc22420485124e28bf54e968d70e03eb3fbd783a4a0') package() { - cd "$pkgname-$pkgver" - - install -dm 755 "$pkgdir/usr/bin" - install -dm 755 "$pkgdir/usr/share/$pkgname" - - install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" *.md - install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - - cp -a docs/* "$pkgdir/usr/share/doc/$pkgname/" - - rm -rf *.md LICENSE.txt docs - - cp -a * "$pkgdir/usr/share/$pkgname/" - cp -a .gitignore .editorconfig .rubocop.yml .yardopts .yardopts-dev "$pkgdir/usr/share/$pkgname/" - - cat > "$pkgdir/usr/bin/$pkgname" << EOF -#!/bin/sh -cd /usr/share/$pkgname -exec bundle exec ./bin/$pkgname "\$@" -EOF - - chmod a+x "$pkgdir/usr/bin/$pkgname" - - cat > "$pkgdir/usr/bin/$pkgname-console" << EOF -#!/bin/sh -cd /usr/share/$pkgname -exec bundle exec ./bin/${pkgname}_console "\$@" -EOF - - chmod a+x "$pkgdir/usr/bin/$pkgname-console" + local _gemdir="$(ruby -e'puts Gem.default_dir')" + gem install --ignore-dependencies --no-user-install --no-document -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem + rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem" + find "$pkgdir/$_gemdir/extensions/" -name *.so -delete + rm -r "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/test" + install -D -m644 "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/haiti.install b/haiti.install deleted file mode 100644 index 91dd06f58d0c..000000000000 --- a/haiti.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { - set -e - cd /usr/share/haiti - rm -f Gemfile.lock - bundle config build.nokogiri --use-system-libraries - bundle install --path vendor/bundle -} - -post_upgrade() { - post_install "$@" -} |