-
Notifications
You must be signed in to change notification settings - Fork 1
/
PKGBUILD
41 lines (40 loc) · 1.16 KB
/
PKGBUILD
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: AnzoDK <[email protected]>
pkgname="rpcommon"
provides=('rpcommon')
conflicts=('rpcommon-dev')
pkgver=0.2.r98.c4df3ed
MAJORVERSION=0.2
pkgver()
{
cd RPCommonLib
printf "$MAJORVERSION.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
pkgrel=1
arch=('any')
pkgdesc="A compilation of small and common functions to make the dev life easier"
url="https://github.com/AnzoDK/RPCommonLib"
makedepends=('git')
source=("git+https://github.com/AnzoDK/RPCommonLib.git#branch=master")
license=('BSD2')
md5sums=('SKIP')
prepare()
{
echo -e "#pragma once\n#define RPCOMMON_VERSION \"$pkgver\"" > RPCommonLib/RPCommon/version.h
LAST=$(cut -d "." -f3 <<< $pkgver);
NUMERIC=$(expr ${pkgver:0:1} \* 10 + ${pkgver:2:1} \* 5 + ${LAST:1})
echo -e "#define RPCOMMON_VERSION_NR ${NUMERIC}" >> RPCommonLib/RPCommon/version.h
}
package()
{
cd RPCommonLib
make
./test.out
if [ $? -ne 0 ]
then
echo "Tests Failed!! - Dying!"
exit 1
fi
mkdir -p "$pkgdir/usr/include/RPCommon"
install -D ./RPCommon/* "$pkgdir/usr/include/RPCommon/"
#install -D ./LICENSE "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
}