summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 56a5fcaf0b1ade6d8f8a3a722f957d2ac6a6ae77 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: fenrig <fenrig.linux at outlook.com>
pkgname=libsahtrace-git
pkgver=0.1.0.r0.g37c28b2
pkgrel=3
pkgdesc="Small and flexible library to enable tracing and logging"
arch=('any')
url="https://gitlab.com/soft.at.home/logging/libsahtrace.git"
license=('MIT')

depends=(
)
makedepends=(
	'sah_components_config'
	'm4'
	'gcc'
	'make'
)
provides=(
	'libsahtrace'
	'libsahtrace-git'
)
conflicts=(
	'libsahtrace'
	'libsahtrace-git'
)

gitbranch="master"

source=("${pkgname}::git+https://gitlab.com/soft.at.home/logging/libsahtrace.git#branch=${gitbranch}" "components.config")
md5sums=('SKIP' 'SKIP')

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

prepare() {
	sah_components_config
	! mkdir include
	cp -f components.h include/components.h 
}

build() {
	# STAGINGDIR
	export STAGINGDIR=$(pwd)
	# Disable some warnings
	export CFLAGS+=" -Wstringop-overflow=0"
	cd "${pkgname}"
	make clean
	make
}

package() {
	cd "${pkgname}"
	make D="${pkgdir}/" install
	mv ${pkgdir}/lib/libsahtrace* ${pkgdir}/usr/lib/
	rm -Rf ${pkgdir}/lib/
}