diff options
author | João Figueiredo | 2021-02-02 00:18:39 +0000 |
---|---|---|
committer | João Figueiredo | 2021-02-02 00:18:39 +0000 |
commit | cfc50aa7730902b715a6244c3143bd9440faa254 (patch) | |
tree | f5b757f160bf2520876fd60a8f663626087b7c54 | |
parent | 1ab520da956e9124b80e205952f48b19471c809b (diff) | |
download | aur-cfc50aa7730902b715a6244c3143bd9440faa254.tar.gz |
Better pkgver() and build()
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 32 |
2 files changed, 18 insertions, 20 deletions
@@ -1,13 +1,13 @@ pkgbase = elf-dissector-git pkgdesc = Static analysis tool for ELF libraries and executables - pkgver = r775.6659853 + pkgver = 0.0.1_r776.g4113e8b pkgrel = 1 url = https://invent.kde.org/sdk/elf-dissector arch = x86_64 license = GPL - makedepends = extra-cmake-modules + makedepends = extra-cmake-modules-git makedepends = git - makedepends = kitemmodels + makedepends = kitemmodels-git depends = harfbuzz depends = hicolor-icon-theme depends = libdwarf @@ -1,33 +1,31 @@ # Maintainer: João Figueiredo <jf dot mundox at gmail dot com> pkgname=elf-dissector-git -pkgver=r775.6659853 +pkgver=0.0.1_r776.g4113e8b pkgrel=1 -pkgdesc="Static analysis tool for ELF libraries and executables" -arch=('x86_64') -url="https://invent.kde.org/sdk/elf-dissector" -license=('GPL') -depends=('harfbuzz' 'hicolor-icon-theme' 'libdwarf' 'qt5-base') +pkgdesc='Static analysis tool for ELF libraries and executables' +arch=($CARCH) +url='https://invent.kde.org/sdk/elf-dissector' +license=(GPL) +depends=(harfbuzz hicolor-icon-theme libdwarf qt5-base) +makedepends=(extra-cmake-modules-git git kitemmodels-git) optdepends=('capstone: disassembler' - 'gnuplot: performance plot') -makedepends=('extra-cmake-modules' 'git' 'kitemmodels') + 'gnuplot: performance plot') source=('git+https://github.com/KDE/elf-dissector.git') sha256sums=('SKIP') pkgver() { - cd ${pkgname%-git} - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd ${pkgname%-git} + _ver="$(grep -m1 'project(elf-dissector VERSION' CMakeLists.txt | cut -d ' ' -f3 | tr - . | tr -d ')')" + echo "${_ver}_r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" } build() { - cd ${pkgname%-git} - mkdir -p build - cd build - cmake .. - make + cmake -B build -S ${pkgname%-git} \ + -DBUILD_TESTING=OFF + cmake --build build } package() { - cd ${pkgname%-git}/build - make DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" cmake --install build } |