makedeb


cbonsai-git 1b3ee97a2021.08.17-2


A bonsai tree generator, written in C using ncurses (git version)

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for cbonsai-git.

# Maintainer: only_vip <onlyme_vip@protonmail.com>
pkgname=cbonsai-git
_gitpkg=cbonsai
pkgver=1b3ee97a2021.08.17
pkgrel=2
pkgdesc='A bonsai tree generator, written in C using ncurses (git version)'
arch=('aarch64' 'arm' 'armv6h' 'armv7h' 'i686' 'pentium4' 'amd64')
url="https://gitlab.com/jallbrit/cbonsai"
license=('GPL3')
depends=('libncursesw5-dev')
makedepends=('scdoc')
provides=('cbonsai')
conflicts=('cbonsai')
source=("${_gitpkg}::git+https://gitlab.com/jallbrit/cbonsai.git")
md5sums=(SKIP)

pkgver() {
    cd "${srcdir}/${_gitpkg}"
    _always=$(git describe --always | sed -e 's:-:.:g' -e 's:v::') # always is mobile, and switches between numbers and letters, can't use it for versioning
    _commits=$(git rev-list --count HEAD | sed 's:-:.:g') # total commits is the most sane way of getting incremental pkgver
    _date=$(git log -1 --date=short --pretty=format:%cd)
    printf "%s%s%s\n" "${_commits}" "${_always}" "${_date}" | sed -e 's:-:.:g'  -e 's:_:.:g'
}

package() {
  cd "${srcdir}"/"${_gitpkg}"
  make DESTDIR="${pkgdir}" PREFIX="/usr" install
}