summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 590f5d97b89b725e0c05769c60b014e22827d543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Maintainer: Kevin MacMartin <prurigro@gmail.com>

pkgname=nightfall
pkgver=1.1
pkgrel=1
pkgdesc='Cjdns inet auto-peering tracker'
url="https://github.com/kpcyrd/nightfall"
license=('GPL3')
arch=('any')
depends=('nodejs')
install=$pkgname.install
source=("$url/archive/v$pkgver.tar.gz")
sha512sums=('ec9238bd809d5bc5343655c9f7f433c06116b903b78c8c9bd6fee72167f5a6c7435f42a6c2bb405235dc7c39271c8df2aa241cf5199df418d0d101d1dbc33a6c')

prepare() {
  # Change the dependency on /usr/bin/nodejs to /usr/bin/node
  sed -i 's|^#!/usr/bin/env nodejs|#!/usr/bin/env node|' $pkgname-$pkgver/$pkgname.js
}

package() {
  cd $pkgname-$pkgver
  # Install the script
  install -Dm755 $pkgname.js "$pkgdir/usr/bin/$pkgname"
  # Install documentation
  install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
  # Install the systemd service
  install -Dm644 init/$pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
}