summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Röthke2018-08-14 14:26:00 +0200
committerMarcel Röthke2018-08-14 14:26:00 +0200
commita75394eb1f71812c113d2feb667a01f205a34c4f (patch)
tree758d1d7eb0d6ebe592bff06cf20f102cd95061b2
parentcac0107bd31ccfdebaa219edee9f746a11fb0dcc (diff)
downloadaur-a75394eb1f71812c113d2feb667a01f205a34c4f.tar.gz
upgpkg: rtrlib-git r626.a4f69d6-1
general PKGBUILD fixes and add check function
-rw-r--r--PKGBUILD43
1 files changed, 35 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 79d4eeebad7..6c136b73cf6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,16 @@
-# Maintainer: Marcel Röthke <marce.roethke@haw-hamburg.de>
+# Maintainer: Marcel Röthke <marcel.roethke@haw-hamburg.de>
pkgname=rtrlib-git
-pkgver=r556.1caa14e
+pkgver=r626.a4f69d6
pkgrel=1
pkgdesc="RPKI-RTR client library"
arch=(x86_64 i686)
url="https://github.com/rtrlib/rtrlib"
license=('MIT')
depends=(libssh)
-makedepends=(cmake)
+makedepends=(cmake chrpath git)
conflicts=(rtrlib)
+checkdepends=(cmocka)
options=()
source=("git+https://github.com/rtrlib/rtrlib.git")
md5sums=(SKIP)
@@ -19,16 +20,42 @@ pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare() {
+ cd ${srcdir}/${pkgname%-git}
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
+ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
+ -DCMAKE_EXE_LINKER_FLAGS:STRING="${LDFLAGS}" \
+ -DCMAKE_SHARED_LINKER_FLAGS:STRING="${LDFLAGS}" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR:STRING=lib \
+ .
+}
+
build() {
cd ${srcdir}/${pkgname%-git}
- cmake -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR:STRING=lib \
- .
- make rtrlib
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname%-git}
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
+ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
+ -DCMAKE_EXE_LINKER_FLAGS:STRING="${LDFLAGS}" \
+ -DCMAKE_SHARED_LINKER_FLAGS:STRING="${LDFLAGS}" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR:STRING=lib \
+ -DUNIT_TESTING=y \
+ .
+
+ make
+ make test
}
package() {
cd ${srcdir}/${pkgname%-git}
make DESTDIR="${pkgdir}" install
+ chrpath -d ${pkgdir}/usr/bin/{rtrclient,cli-validator}
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}