New package: librespeed-cli-1.0.10

This commit is contained in:
Massimo Manzato 2023-08-03 18:20:59 +02:00 committed by classabbyamp
parent c955a98715
commit 8fb57e4046
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# Template file for 'librespeed-cli'
pkgname=librespeed-cli
version=1.0.10
revision=1
build_style=go
go_import_path="github.com/librespeed/speedtest-cli"
go_ldflags="-X librespeed-cli/defs.ProgName=${pkgname} -X librespeed-cli/defs.ProgVersion=${version}"
short_desc="LibreSpeed command line tool"
maintainer="Massimo Manzato <massimo.manzato@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/librespeed/speedtest-cli"
distfiles="https://github.com/librespeed/speedtest-cli/archive/refs/tags/v${version}.tar.gz"
checksum=904ec84f41714d5a7ab778534d332219cd254fdd0f97cc33ebb3540d31fb802c
pre_build() {
local _date
if [ "$SOURCE_DATE_EPOCH" ]; then
_date="$(date --utc --date "@$SOURCE_DATE_EPOCH" "+%Y-%m-%d")"
go_ldflags+=" -X librespeed-cli/defs.BuildDate=${_date}"
fi
}
post_install() {
# Rename the executable due to conflic with PKG speedtest-cli
mv "${DESTDIR}"/usr/bin/{speedtest,librespeed}-cli
}