summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authornoraj2019-10-03 04:01:16 +0200
committernoraj2019-10-03 04:01:16 +0200
commit31703a0091478dba0bc023b2cc330a65c801be10 (patch)
treeac6b14693516c95ef0d9a1351c54edc268aa7aee
parenta0513a359a4e2378a3a41d426b28a5d847e98ffb (diff)
downloadaur-31703a0091478dba0bc023b2cc330a65c801be10.tar.gz
v0.0.3
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD56
-rw-r--r--rabid.install11
4 files changed, 57 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fa8fb048da5a..e1b50d7d222a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,18 @@
pkgbase = rabid
pkgdesc = A CLI tool and library allowing to simply decode all kind of BigIP cookies.
- pkgver = 0.0.1
+ pkgver = 0.0.3
pkgrel = 1
url = https://orange-cyberdefense.github.io/rabid/
+ install = rabid.install
arch = any
license = MIT
- makedepends = rubygems
depends = ruby
- depends = ruby-paint
- depends = ruby-docopt
- noextract = rabid-0.0.1.gem
- source = https://rubygems.org/downloads/rabid-0.0.1.gem
- sha512sums = f3aafe6620540d5a3b7ba5263761abd929067702b6354263783787c3893177f004a1a8efdc586d63f149ff6ce9a5ce600f8f2527860908c5ede54119cb8930a0
+ depends = ruby-bundler
+ depends = libxslt
+ provides = rabid
+ conflicts = rabid-git
+ source = https://github.com/Orange-Cyberdefense/rabid/archive/v0.0.3.tar.gz
+ sha512sums = e33c4c9713643fed9c81ff287b3befd826af3b52b7af714c6ac3a92cec937029ae806d49ab6ca47111ebb8b6a4522e7c11e838053e6a041de3aae902a7e409f5
pkgname = rabid
diff --git a/.gitignore b/.gitignore
index b9397c12c4cf..35b00345f89d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.gem
*.tar.xz
+*.tar.gz
pkg/
src/
diff --git a/PKGBUILD b/PKGBUILD
index 38015ce17c75..2521a7ddd098 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,49 @@
# Maintainer: noraj <printf %s 'YWxleGFuZHJlLnphbm5pQGV1cm9wZS5jb20='|base64 -d>
pkgname=rabid
-_gemname=rabid
-pkgver=0.0.1
+pkgver=0.0.3
pkgrel=1
pkgdesc='A CLI tool and library allowing to simply decode all kind of BigIP cookies.'
arch=('any')
url='https://orange-cyberdefense.github.io/rabid/'
license=('MIT')
-depends=('ruby' 'ruby-paint' 'ruby-docopt')
-makedepends=('rubygems')
-source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
-noextract=("$_gemname-$pkgver.gem")
-sha512sums=('f3aafe6620540d5a3b7ba5263761abd929067702b6354263783787c3893177f004a1a8efdc586d63f149ff6ce9a5ce600f8f2527860908c5ede54119cb8930a0')
+depends=('ruby' 'ruby-bundler' 'libxslt')
+conflicts=('rabid-git')
+provides=('rabid')
+source=("https://github.com/Orange-Cyberdefense/$pkgname/archive/v$pkgver.tar.gz")
+sha512sums=('e33c4c9713643fed9c81ff287b3befd826af3b52b7af714c6ac3a92cec937029ae806d49ab6ca47111ebb8b6a4522e7c11e838053e6a041de3aae902a7e409f5')
+install="$pkgname.install"
package() {
- local _gemdir="$(ruby -r rubygems -e'puts Gem.default_dir')"
-
- if [[ $CARCH == arm* ]] ; then
- gem install --ignore-dependencies --no-user-install --no-rdoc --no-ri \
- -i "$pkgdir$_gemdir" "$_gemname-$pkgver.gem"
- else
- gem install --ignore-dependencies --no-user-install -i "$pkgdir$_gemdir" \
- "$_gemname-$pkgver.gem"
- fi
-
- rm -rf "$pkgdir/$_gemdir/cache"
- install -D -m644 "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ 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 .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/rabid.install b/rabid.install
new file mode 100644
index 000000000000..a4fc56fc02fb
--- /dev/null
+++ b/rabid.install
@@ -0,0 +1,11 @@
+post_install() {
+ set -e
+ cd /usr/share/rabid
+ rm -f Gemfile.lock
+ bundle config build.nokogiri --use-system-libraries
+ bundle install --path vendor/bundle
+}
+
+post_upgrade() {
+ post_install "$@"
+}