summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Röthke2018-08-14 14:27:35 +0200
committerMarcel Röthke2018-08-14 14:27:35 +0200
commita6357c80eb836c09ec7fb05f158d2b85e60e75d7 (patch)
tree07a7b51a0e7431e7067797954b6eaa90c529f5fb
parent8adff973ce21f54fc3aef53e5e2a22c6fce698f1 (diff)
downloadaur-a6357c80eb836c09ec7fb05f158d2b85e60e75d7.tar.gz
upgpkg: rtrlib 0.5.0-1
general PKGBUILD fixed and add check function
-rw-r--r--PKGBUILD40
1 files changed, 33 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 25b0f67a5e9..17245841101 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Marcel Röthke <marce.roethke@haw-hamburg.de>
+# Maintainer: Marcel Röthke <marcel.roethke@haw-hamburg.de>
pkgname=rtrlib
pkgver=0.5.0
@@ -8,22 +8,48 @@ arch=(x86_64 i686)
url="https://github.com/rtrlib/rtrlib"
license=('MIT')
depends=(libssh)
-makedepends=(cmake)
+makedepends=(cmake chrpath)
+checkdepends=(cmocka)
options=(strip)
source=("rtrlib-$pkgver.tar.gz::https://github.com/rtrlib/rtrlib/archive/v$pkgver.tar.gz")
md5sums=(3500630ad1f143c28b6f29167036893b)
+prepare() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ 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}-${pkgver}
- cmake -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR:STRING=lib \
- .
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ 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 rtrlib
+ make
+ make test
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
+ chrpath -d ${pkgdir}/usr/bin/{rtrclient,cli-validator}
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}