summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgustawho2021-04-29 13:19:12 -0600
committergustawho2021-04-29 13:19:12 -0600
commit4a093376a4ccf3cbf4fba1592b11c1a94e560d32 (patch)
treef14d260bf8d274779f50aea634057b5a595f1169
parent794026b4ec7ceaf94234a3fd749478a72fb12c64 (diff)
downloadaur-4a093376a4ccf3cbf4fba1592b11c1a94e560d32.tar.gz
PKGBUILD cleanup
-rw-r--r--PKGBUILD13
1 files changed, 7 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4c9d5cd8712..86ffa3bca2d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,16 +16,17 @@ md5sums=('SKIP')
pkgver() {
cd "${pkgname%-git}"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}
build() {
- cd "${pkgname%-git}"
- cmake -DCMAKE_INSTALL_PREFIX=/usr -B build
- make -C build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -B build -S "${pkgname%-git}"
+ cmake --build build
}
package() {
- cd "${pkgname%-git}"
- make -C build DESTDIR="${pkgdir}" PREFIX=/usr install
+ DESTDIR="${pkgdir}" cmake --install build
}