summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 150e277c0a41c318b601d5cda502e004dbfc962e (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
43
44
45
# Maintainer: Clément Bénier <clement.benier@iot.bzh>
pkgname=afb-libhelpers-git
pkgver=9.99.1+20+g6cc5d85
pkgrel=1
pkgdesc="useful utilities to integrate in your afb bindings development."
arch=('x86_64')
url="https://github.com/redpesk-common/afb-libhelpers.git"
license=('LGPL3')
depends=()
makedepends=('cmake' 'gcc' 'make' 'lua' 'git')
checkdepends=()
optdepends=()
provides=('afb-libhelpers')
conflicts=('afb-libhelpers')
replaces=()
backup=()
options=()
install=
changelog=
source=("${pkgname%-git}::git+https://github.com/redpesk-common/afb-libhelpers.git")
noextract=()
md5sums=('SKIP')
validpgpkeys=()

pkgver() {
    cd "$srcdir/${pkgname%-git}"
	git describe | sed "s/-/+/g"
}

build() {
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=lib \
		"$srcdir/${pkgname%-git}"
    make -j
}

package() {
	make DESTDIR="$pkgdir/" install

	#keep compatibility with ancient name
	ln -sf afb-libhelpers.pc "${pkgdir}/usr/lib/pkgconfig/afb-helpers.pc"

    install -D -m644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}