From 371feaa4f03d5b7fb9cdcc37a9631ec928ebc5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Sun, 20 Nov 2022 14:59:53 +0300 Subject: init commit --- PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 PKGBUILD (limited to 'PKGBUILD') diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..57e388c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Yaroslav de la Peña Smirnov + +pkgname=waybar-mpris-yaroslav-git +_pkgname=waybar-mpris +pkgver=r57.6bb667a +pkgrel=1 +pkgdesc='MPRIS2 waybar component' +arch=('any') +url="https://git.yaroslavps.com/waybar-mpris" +license=('unknown') +provides=('waybar-mpris') +conflicts=('waybar-mpris' 'waybar-mpris-git') +depends=('glibc') +makedepends=('go' 'git') +source=(git+$url) +md5sums=(SKIP) + +pkgver() { + cd "${_pkgname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + + cd "$_pkgname" + go build +} + +package() { + cd "$_pkgname" + install -vDm 755 $_pkgname "$pkgdir/usr/bin/$_pkgname" +} -- cgit v1.2.3