summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAdrian Perez de Castro2018-12-06 22:08:05 +0200
committerAdrian Perez de Castro2018-12-06 22:08:05 +0200
commit13a7e24ee6e9625fd53f559a19bc251bca8ad1fd (patch)
treebad07e5ff5864e6f7c2af6d8e57edcf4562b0b38 /PKGBUILD
parente51726e31a5bb37319f6ddd56747a5f272c1f88c (diff)
downloadaur-13a7e24ee6e9625fd53f559a19bc251bca8ad1fd.tar.gz
Add conflict with plain bloaty, update pkgver()
Upstream has made a release, and AUR has a package for it, so add it to the "conflicts" array. Also, update the "pkgver()" function to take tags into account, so the -git package has a resulting version number equal or greater than the most recent tagged release.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 19 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1623c82c0c10..2abd3a83de4e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,25 @@
# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
# Contributor: Yamakaky <yamakaky@yamaworld.fr>
pkgname=bloaty-git
-pkgver=0.0.0.r232.g340c0a7
+pkgver=v1.0.r2.gfeaca23
pkgrel=1
-pkgdesc="A size profiler for binaries"
-arch=("x86_64" "x86")
-url="https://github.com/google/bloaty"
-license=("Apache")
-depends=('gcc-libs')
-makedepends=('git' 'cmake')
-source=("git+https://github.com/google/bloaty")
-md5sums=("SKIP")
+pkgdesc='A size profiler for binaries'
+arch=(x86_64 i686)
+url=https://github.com/google/bloaty
+license=(Apache)
+depends=(gcc-libs)
+makedepends=(git cmake)
+conflicts=(bloaty)
+source=("${pkgname}::git+${url}")
+sha512sums=(SKIP)
-pkgver() {
- cd bloaty
- printf "0.0.0.r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+pkgver () {
+ cd "${pkgname}"
+ (
+ set -o pipefail
+ git describe --long --tags 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() {
@@ -23,7 +28,7 @@ build() {
cd "${srcdir}/build"
cmake -G 'Unix Makefiles' \
-DCMAKE_INSTALL_PREFIX=/usr \
- "${srcdir}/bloaty"
+ "${srcdir}/${pkgname}"
make
}
@@ -31,6 +36,6 @@ package() {
cd "${srcdir}/build"
install -Dm755 "${srcdir}/build/bloaty" \
"${pkgdir}/usr/bin/bloaty"
- install -Dm644 "${srcdir}/bloaty/README.md" \
+ install -Dm644 "${srcdir}/${pkgname}/README.md" \
"${pkgdir}/usr/share/doc/${pkgname}/README.md"
}