From 3f34ff82c4e4c4229c2ef3d87966c445c1909e09 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Sun, 14 Jun 2020 22:05:04 +0200 Subject: [PATCH] prepare automatic updates --- PKGBUILD | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index fbcb5c4..ae0345e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,42 +5,44 @@ # Maintainer: Marten Kante pkgname=st-tiyn-git -pkgver=0.8.3.r40.083167e +pkgver=0.8.2 pkgrel=1 epoch= -pkgdesc="This is the st build of tiyn. It includes the alpha, anysize, font2, scrollback patches." -arch=(x86_64 i686) +pkgdesc="This is the st build of tiyn. It includes a bunch of patches." +arch=('x86_64' 'i686') url="https://github.com/tiyn/st" license=('MIT') groups=() -depends=(libxft-bgra) +depends=('libxft-bgra') makedepends=(git) checkdepends=() optdepends=() -provides=(st) -conflicts=(st) -replaces=(st) +provides=('st') +conflicts=('st') +replaces=('st') backup=() options=() install= changelog= -source=("git+$url") +source=("${pkgname}::git+$url") noextract=() md5sums=('SKIP') validpgpkeys=() pkgver() { - cd "${_pkgname}" - printf "0.8.3.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${pkgname}" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "0.8.2.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)") } build() { - cd st + cd "${pkgname}" make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 } package() { - cd st + cd "${pkgname}" mkdir -p ${pkgdir}/opt/${pkgname} cp -rf * ${pkgdir}/opt/${pkgname} make PREFIX=/usr DESTDIR="${pkgdir}" install