makedeb


xtitle-git 16f465842019.08.26-1


Outputs X window titles

Viewing /PKGBUILD.

View raw.

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

# Maintainer: only_vip <onlyme_vip@protonmail.com>
_pkgname="xtitle"
pkgname="${_pkgname}-git"
pkgver='16f465842019.08.26'
pkgrel=1
pkgdesc="Outputs X window titles"
arch=('i686' 'amd64')
url="https://github.com/baskerville/${_pkgname}"
license=('custom:Unlicense')
depends=('libxcb1' 'libxcb-icccm4' 'libxcb-ewmh2')
makedepends=('libxcb1-dev' 'libxcb-icccm4-dev' 'libxcb-ewmh-dev')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("$pkgname::git+https://github.com/baskerville/${_pkgname}.git")
md5sums=('SKIP')

pkgver() {
  cd $pkgname
    _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'
}

build() {
  cd $pkgname
  make PREFIX=/usr
}

package() {
  cd $pkgname
  make PREFIX=/usr DESTDIR="$pkgdir" install
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}