Updated pkgbuild to actually install

This commit is contained in:
Paul Dino Jones 2024-09-19 21:21:30 -04:00
parent 128d02e71a
commit c4a1cbcfb8
1 changed files with 18 additions and 11 deletions

View File

@ -17,6 +17,7 @@ depends=(
)
makedepends=(
git
cmake
)
source=(
git+https://github.com/spacefreak18/monocoque
@ -25,18 +26,24 @@ sha256sums=(
'SKIP'
)
pkgver() {
cd "$srcdir/$_reponame"
git describe --long --tags | cut -d "-" -f 1-2 | tr "-" "r"
build() {
#-G 'Unix Makefiles' \
cmake \
-B "${_reponame}/build" \
-S "${_reponame}" \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX:PATH='/usr' \
-Wno-dev
cmake --build "${_reponame}/build"
}
check() {
ctest --test-dir "${_reponame}/build" --output-on-failure --stop-on-failure
}
package() {
cd "$srcdir/$_reponame" || exit 1
git submodule sync --recursive
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make
mkdir -p "${pkgdir}/usr/bin/"
cp "${_reponame}/build/monocoque" "${pkgdir}/usr/bin/"
install -D -m644 "${_reponame}/LICENSE.rst" -t "${pkgdir}/usr/share/licenses/${_reponame}"
}