summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 38cd414008309bede03bf4ce717f004574062b94 (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: Egor Panasenko <gaura.panasenko@gmail.com>

pkgname=ponyprog
pkgver=3.0.2.r296.f936d4b
pkgrel=7
pkgdesc="PonyProg is a serial device programmer based on some simple and cheap interfaces for the PC"
arch=('any')
url="http://www.LancOS.com"
license=('GPLv2')
depends=("qt5-base" "qt5-multimedia")
makedepends=("coreutils" "git" "cmake")
source=("git://github.com/lancos/${pkgname}.git")
md5sums=("SKIP")

pkgver() {
	cd "$srcdir/${pkgname%-git}"

# Git, tags available
	printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/V2_08d/3.0.2/g')"
}

prepare() {
	cd "$srcdir/${pkgname%-git}"
	git submodule update --init
}

build() {
	cd "$srcdir/${pkgname%-git}"
	CPU_NUM=$(nproc --all)
	DIRECTORY="build"
	install -m755 -d "$DIRECTORY"
	cd "$DIRECTORY"
	rm * -rf
	cmake -DUSE_DEBUGGER=OFF -DUSE_QT5=ON -DCMAKE_INSTALL_PREFIX=/usr ..
	make -j$CPU_NUM
}

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