summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7bc5af64dab5de36465584345bc69dab10d1da42 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: Pau Escrich <p4u@dabax.net>

pkgname=bmx6
pkgver=r662.8f26909
pkgrel=1
pkgdesc="Bmx6 mesh routing network protocol including json, sms and table plugins"
arch=('i686' 'x86_64')
url="http://bmx6.net"
license=('GPL2')
depends=('glibc' 'json-c')
makedepends=('git' 'make' 'gcc')
conflicts=('')
provides=('bmx6')

source=("$pkgname"::'git+https://github.com/axn/bmx6')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$pkgname"
  make
  #JSON plugin
  sed -i s/"json\/json.h"/"json-c\/json.h"/g lib/bmx6_json/json.c
  make -C lib/bmx6_json/
  #SMS plugin
  make -C lib/bmx6_sms/
  #Table plugin
  make -C lib/bmx6_table/
}

package() {
  install -D -m 644 ${startdir}/${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service
  cd "$srcdir/$pkgname"
  install -D -m 755 bmx6 ${pkgdir}/usr/bin/bmx6
  install -D -m 755 lib/bmx6_json/bmx6_json.so ${pkgdir}/usr/lib/bmx6_json.so
  install -D -m 755 lib/bmx6_sms/bmx6_sms.so ${pkgdir}/usr/lib/bmx6_sms.so
  install -D -m 755 lib/bmx6_table/bmx6_table.so ${pkgdir}/usr/lib/bmx6_table.so
}