summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e54bad602e6b6482b6ff84b2184e3055df4edbc4 (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
# Maintainer: Adam Nielsen <malvineous@shikadi.net>

pkgname=mbpoll-git
pkgver=v1.4.11.r14.g1968de6
pkgrel=2
pkgdesc="CLI for talking to Modbus devices, similar to modpoll"
url="https://github.com/epsilonrt/mbpoll"
license=('GPL-3.0')
arch=('i686' 'x86_64')
depends=(libmodbus)
makedepends=(cmake)
options=()
source=("git+https://github.com/epsilonrt/mbpoll")
md5sums=('SKIP')

build() {
	cd "${srcdir}/mbpoll"
	mkdir -p build
	cd build
	rm -f CMakeCache.txt
	cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr ../
	make
}

package() {
	cd "${srcdir}/mbpoll/build"
	make DESTDIR="${pkgdir}" install
}

pkgver() {
	cd "${srcdir}/mbpoll"
	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}