void-packages/srcpkgs/saldl/template

32 lines
915 B
Bash

# Template file for 'saldl'
pkgname=saldl
version=40
revision=2
build_style=waf3
configure_args="--saldl-version v${version} --no-werror"
hostmakedepends="pkg-config asciidoc"
makedepends="libevent-devel libcurl-devel"
short_desc="CLI downloader optimized for speed and early preview"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="AGPL-3.0-or-later"
homepage="https://saldl.github.io/"
distfiles="https://github.com/saldl/saldl/archive/v${version}.tar.gz"
checksum=1cb7950848517fb82ec39561bf36c8cbc0a0caf8fa85355a5b76cac0281346ce
CFLAGS="-fcommon"
post_extract() {
# waf file is self extracting archive written in python
# it self extracts in top level, then runs extracted module in __main__
# importing allows to patch contents of archive
cp waf waf.py
sed -i '/__name__.*__main__/i sys.exit(0)' waf.py
python3 waf.py
ln -s .waf3-* .waf3
rm waf.py
}
post_install() {
vlicense LICENSE
}