summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2021-01-21 10:38:34 +0100
committerbartus2021-01-21 10:38:34 +0100
commit9bafae7c8f2f63252febd3dcc7d03ac00e6a7c21 (patch)
treeb4a98fb2ae3e0f3aa0e40ed633ffb926cbc95912
parent46be06089637f23c031873b6458e28fd51478577 (diff)
downloadaur-9bafae7c8f2f63252febd3dcc7d03ac00e6a7c21.tar.gz
Switch to ninja, Refactor package()
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD10
2 files changed, 6 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 75a91e4cd259..636e7f9b72ae 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,6 +7,7 @@ pkgbase = cxxopts-git
license = MIT
makedepends = git
makedepends = cmake
+ makedepends = ninja
source = cxxopts-git::git+https://github.com/jarro2783/cxxopts.git
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index bf3977d21de4..f89a41ba4165 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ pkgdesc="Lightweight C++ command line option parser"
arch=(any)
url="https://github.com/jarro2783/cxxopts"
license=(MIT)
-makedepends=(git cmake)
+makedepends=(git cmake ninja)
source=(${pkgname}::git+https://github.com/jarro2783/cxxopts.git${_fragment})
md5sums=(SKIP) #generate with 'makepkg -g'
@@ -21,14 +21,14 @@ build() {
cmake \
-S "$pkgname" \
-B build \
+ -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr
- make
+ ninja -C build ${MAKEFLAGS:--j1}
}
package() {
- cd ${pkgname}/build
- make DESTDIR="$pkgdir/" install
- install -D -m644 "../LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ DESTDIR="$pkgdir/" ninja -C build install
+ install -D -m644 "$pkgname"/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim:set ts=2 sw=2 et: