Skip to content

Instantly share code, notes, and snippets.

@jclds139
Created February 14, 2020 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jclds139/e99957bb100214c97c2d74afade45d26 to your computer and use it in GitHub Desktop.
Save jclds139/e99957bb100214c97c2d74afade45d26 to your computer and use it in GitHub Desktop.
wslu-git PKGBUILD with pkgver function
# Maintainer: Patrick Wu <wotingwu@live.com>
pkgname=wslu-git
pkgver=vrolling
pkgrel=2
pkgdesc="A collection of utilities for Windows 10 Linux Subsystems"
arch=('any')
url='https://github.com/wslutilities/wslu'
license=('GPL3')
depends=('bc' 'imagemagick' 'bash-completion')
makedepends=('git' 'make' 'gzip')
pkgbase=${pkgname%-git}
conflicts=('wslu')
provides=('wslu')
source=("git+https://github.com/wslutilities/wslu.git")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/wslu"
# VERSION='VER_NUM.rREV_NUM.HASH', or a relevant subset in case VER_NUM or HASH
# are not available, is recommended.
# Git, tags available
printf "%s" "$(git describe --tags --long | sed 's/v\([0-9.]\+\)-\([0-9]\+\)-\(.*\)$/\1r\2.\3/')"
}
build() {
cd wslu
make
}
package() {
cd wslu
install -Dm 755 out/* -t "${pkgdir}"/usr/bin/
install -Dm 555 docs/* -t "${pkgdir}"/usr/share/man/man1/
install -Dm 555 src/etc/* -t "${pkgdir}"/usr/share/wslu/
install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/wslu/
}
# vim: ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment