summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authororhun2020-10-09 22:16:26 +0300
committerorhun2020-10-09 22:16:26 +0300
commit1043fe55de5c4b4a21158bc4e1ac919849b6711e (patch)
treef72d1b676c55c97be9721c472eabf159e435fc3b
parent0f4d87a5faf5d8b1ace84df35fae3a3366e17c6c (diff)
downloadaur-1043fe55de5c4b4a21158bc4e1ac919849b6711e.tar.gz
upgpkg: god 1.9-1
upstream release Adopt from the removed 'god' package
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD57
-rw-r--r--god.install28
-rw-r--r--god.service11
4 files changed, 29 insertions, 90 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d5bf9c83f3..9754a0022e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,13 @@
pkgbase = god
- pkgdesc = A process monitoring framework in Ruby
- pkgver = 0.13.7
+ pkgdesc = Utility for simplifying the Git usage
+ pkgver = 1.9
pkgrel = 1
- url = http://godrb.com
- install = god.install
- arch = i686
+ url = https://github.com/orhun/god
arch = x86_64
- license = MIT
- depends = ruby
- provides = god
- provides = ruby-god
- conflicts = god
- conflicts = ruby-god
- noextract = god-0.13.7.gem
- source = https://rubygems.org/downloads/god-0.13.7.gem
- source = god.service
- sha256sums = 3f8ea08b39310d55a20d54308b4cba6c5c88d35f9796b271d7f38dc93802f8f2
- sha256sums = 4b2ec4edbc94dd11b5178ec66846b94232157d1f9710de5f58fc2deb0a1e1596
+ license = GPL3
+ makedepends = go
+ source = god-1.9.tar.gz::https://github.com/orhun/god/archive/1.9.tar.gz
+ sha512sums = SKIP
pkgname = god
diff --git a/PKGBUILD b/PKGBUILD
index 092f3b0f1ee..d7f1c35d0d3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,42 +1,29 @@
-# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+# Maintainer: orhun <orhunparmaksiz@gmail.com>
+# https://github.com/orhun/pkgbuilds
pkgname=god
-pkgver=0.13.7
+pkgver=1.9
pkgrel=1
-pkgdesc="A process monitoring framework in Ruby"
-arch=('i686' 'x86_64')
-url="http://godrb.com"
-license=('MIT')
-depends=('ruby')
-source=(https://rubygems.org/downloads/${pkgname#*-}-${pkgver}.gem
- god.service)
-sha256sums=('3f8ea08b39310d55a20d54308b4cba6c5c88d35f9796b271d7f38dc93802f8f2'
- '4b2ec4edbc94dd11b5178ec66846b94232157d1f9710de5f58fc2deb0a1e1596')
-noextract=("${pkgname#*-}-${pkgver}.gem")
-provides=('god' 'ruby-god')
-conflicts=('god' 'ruby-god')
-install=god.install
+pkgdesc="Utility for simplifying the Git usage"
+arch=('x86_64')
+url="https://github.com/orhun/god"
+license=('GPL3')
+makedepends=('go')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
+sha512sums=('SKIP')
-_rbver=$(gem env gempath | awk -F: '{print $2}' | sed 's@.*gems/@@')
+build() {
+ cd "$pkgname-$pkgver"
+ go get -d ./...
+ go build \
+ -gcflags "all=-trimpath=$PWD" \
+ -asmflags "all=-trimpath=$PWD" \
+ -ldflags "-extldflags $LDFLAGS" \
+ -o "$pkgname" .
+}
package() {
- cd "$srcdir"
-
- msg2 'Installing...'
- gem install \
- --no-user-install \
- --ignore-dependencies \
- -i "$pkgdir$(ruby -rubygems -e'puts Gem.default_dir')" \
- ${pkgname#*-}-$pkgver.gem
-
- msg2 'Readying directories...'
- mkdir -p "$pkgdir"/{etc/god/conf.d,/var/log/god,}
-
- msg2 'Installing executables in /usr/bin...'
- find "$pkgdir/usr/lib/ruby/gems/$_rbver/bin" -type f -execdir \
- install -Dm 755 '{}' "$pkgdir/usr/bin/"'{}' \;
- rm -rf "$pkgdir/usr/bin/home"
-
- msg2 'Installing systemd service file...'
- install -Dm644 "$srcdir/god.service" "$pkgdir/usr/lib/systemd/system/god.service"
+ cd "$pkgname-$pkgver"
+ install -Dm 755 "$pkgname" -t "$pkgdir/usr/bin"
+ install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
}
diff --git a/god.install b/god.install
deleted file mode 100644
index 4c0f8e7c54f..00000000000
--- a/god.install
+++ /dev/null
@@ -1,28 +0,0 @@
-post_install() {
- _mkuser
- chown -R god:god /etc/god /var/log/god
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- _rmuser
- rm -rf /etc/god /var/log/god
-}
-
-_mkuser() {
- getent passwd god &>/dev/null || {
- echo -n "Creating god user... "
- grep -E "^god:" /etc/group >/dev/null || groupadd god
- useradd -m -d /etc/god -g god -s /usr/bin/nologin god
- echo "done"
- }
-}
-
-_rmuser() {
- echo -n "Removing god user... "
- userdel -rf god 2>/dev/null
- echo "done"
-}
diff --git a/god.service b/god.service
deleted file mode 100644
index e680edce517..00000000000
--- a/god.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=God
-
-[Service]
-Type=simple
-PIDFile=/run/god.pid
-ExecStart=/usr/bin/god -c /etc/god/god.conf -P /run/god.pid -l /var/log/god --log-level info -D
-ExecStop=/usr/bin/god terminate
-
-[Install]
-WantedBy=multi-user.target