summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5da18749325010a8d31f4c8f11cb770e6ef5a365 (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
# Maintainer: Josef Miegl <josef@miegl.cz>

pkgname=librouteros-git
pkgver=20180719.c485c77
pkgrel=1
pkgdesc="C library to communicate with network devices by MikroTik running RouterOS"
url="https://github.com/octo/librouteros"
arch=('i686' 'x86_64' 'aarch64' 'armv7h')
license=('ISC')
makedepends=('git')
depends=('gcc-libs')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/octo/librouteros.git")
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  git log -1 --format='%cd.%h' --date=short | tr -d -
}

prepare() {
  cd "${pkgname%-git}"
  autoreconf -f -i
}

build() {
  cd "${pkgname%-git}"
  ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --localstatedir=/var
  make
}

package() {
  cd "${pkgname%-git}"
  make DESTDIR="${pkgdir}" install

  # License
  install -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
}

# vim:set ts=2 sw=2 et: