diff options
author | noraj | 2019-10-16 19:29:45 +0200 |
---|---|---|
committer | noraj | 2019-10-16 19:29:45 +0200 |
commit | a6384844c79af374f8df738959e7157e71f9f344 (patch) | |
tree | fa06146e4c4142a10d0ee8bfe95816aa445cac08 | |
download | aur-a6384844c79af374f8df738959e7157e71f9f344.tar.gz |
v0.0.1
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 48 | ||||
-rw-r--r-- | haiti.install | 11 |
4 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c6ddeec34bf6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = haiti + pkgdesc = A CLI tool to identify the hash type of a given hash. + pkgver = 0.0.1 + pkgrel = 1 + url = https://orange-cyberdefense.github.io/haiti/ + install = haiti.install + arch = any + license = MIT + depends = ruby + depends = ruby-bundler + depends = libxslt + provides = haiti + conflicts = haiti-git + source = https://github.com/Orange-Cyberdefense/haiti/archive/v0.0.1.tar.gz + sha512sums = d91cad845d36f3dc1f877ecc789fe9d86a06939d5941b0927c303b67bb5dcc28780004cab98b8fccfde496afb74ef4d5cd28cb86132f3fd385df3c838c70320e + +pkgname = haiti + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..35b00345f89d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.gem +*.tar.xz +*.tar.gz +pkg/ +src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..96f0f38b708f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: noraj <printf %s 'YWxleGFuZHJlLnphbm5pQGV1cm9wZS5jb20='|base64 -d> + +pkgname=haiti +pkgver=0.0.1 +pkgrel=1 +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') +conflicts=('haiti-git') +provides=('haiti') +source=("https://github.com/Orange-Cyberdefense/$pkgname/archive/v$pkgver.tar.gz") +sha512sums=('d91cad845d36f3dc1f877ecc789fe9d86a06939d5941b0927c303b67bb5dcc28780004cab98b8fccfde496afb74ef4d5cd28cb86132f3fd385df3c838c70320e') +install="$pkgname.install" + +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" +} diff --git a/haiti.install b/haiti.install new file mode 100644 index 000000000000..91dd06f58d0c --- /dev/null +++ b/haiti.install @@ -0,0 +1,11 @@ +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 "$@" +} |