makedeb


bsptab-git 1e997b892022.02.17-2


Suckless tabbed integration into bspwm

Viewing /PKGBUILD.

View raw.

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

# Maintainer: only_vip <onlyme_vip@protonmail.com>
_pkgname=bsptab
pkgname=${_pkgname}-git
pkgver=1e997b892022.02.17
pkgrel=2
pkgdesc='Suckless tabbed integration into bspwm'
arch=('any')
url='https://github.com/albertored11/bsptab'
license=('MIT')
depends=('tabbed' 'bash' 'awk' 'xdotool')
optdepends=('bspwm' )
makedepends=('git')
provides=('bsptab')
conflicts=('bsptab')
source=("${_pkgname}::git+${url}.git")
md5sums=('SKIP')

pkgver() {
  cd ${_pkgname}
    _always=$(git describe --always | sed -e 's:-:.:g') # tag 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 ${_pkgname}
  make PREFIX=/usr DESTDIR="${pkgdir}" install
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}