summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Figueiredo2021-02-02 00:18:39 +0000
committerJoão Figueiredo2021-02-02 00:18:39 +0000
commitcfc50aa7730902b715a6244c3143bd9440faa254 (patch)
treef5b757f160bf2520876fd60a8f663626087b7c54
parent1ab520da956e9124b80e205952f48b19471c809b (diff)
downloadaur-cfc50aa7730902b715a6244c3143bd9440faa254.tar.gz
Better pkgver() and build()
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD32
2 files changed, 18 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d824035295e8..9679410f0733 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 2c4011bc6d8f..61f0af6c46e7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}