makedeb
generate lemons
Viewing /PKGBUILD
.
Click here to go back to the Git tree for lemonblocks-git.
# Maintainer: only_vip <onlyme_vip@protonmail.com>
_pkgname="lemonblocks"
pkgname="${_pkgname}-git"
pkgver="164087f72021.02.23"
pkgrel=3
pkgdesc="generate lemons"
arch=('i686' 'amd64')
url="https://github.com/b3nj5m1n/${_pkgname}"
license=('custom:Unlicense')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${_pkgname}::git+https://github.com/b3nj5m1n/${_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 BINDIR=/usr
}
package() {
cd ${_pkgname}
install -Dm755 "${srcdir}/${_pkgname}/bin/lemonblocks" "${pkgdir}/usr/bin/lemonblocks"
install -Dm755 "start.sh" "${pkgdir}/usr/bin/start-lemonblocks.sh"
install -Dm755 "${srcdir}/${_pkgname}/modules/"* -t "${pkgdir}/usr/bin/lbscripts/"
install -Dm644 "config.txt" "${pkgdir}/usr/share/docs/${_pkgname}/config.txt"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}