From 72fcedd34ec5021510d185329510ccaa7bfe990e Mon Sep 17 00:00:00 2001 From: Filip Rojek Date: Sun, 28 Dec 2025 21:13:07 +0100 Subject: [PATCH] New package: witr-0.1.1 --- srcpkgs/witr/template | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 srcpkgs/witr/template diff --git a/srcpkgs/witr/template b/srcpkgs/witr/template new file mode 100644 index 00000000000000..26e1e0fdfdd80c --- /dev/null +++ b/srcpkgs/witr/template @@ -0,0 +1,27 @@ +# Template file for 'witr' +pkgname=witr +version=0.1.1 +revision=1 +build_style=go +go_import_path=github.com/pranshuparmar/witr +go_package="./cmd/witr" +go_ldflags="-X main.version=v${version} -X main.commit=v${version}" +short_desc="Tool to determine why a process is running" +maintainer="Filip Rojek " +license="Apache-2.0" +homepage="https://github.com/pranshuparmar/witr" +changelog="https://github.com/pranshuparmar/witr/releases" +distfiles="https://github.com/pranshuparmar/witr/archive/refs/tags/v${version}.tar.gz" +checksum=5d697999be5684a2723d92e649a72c80ca2df464f6e7dcf5e52551b5ee9194fd + +pre_build() { + local _date + if [ "$SOURCE_DATE_EPOCH" ]; then + _date="$(date --utc --date "@$SOURCE_DATE_EPOCH" "+%Y-%m-%d")" + go_ldflags+=" -X main.buildDate=${_date}" + fi +} + +post_install() { + vman docs/witr.1 +}