void-packages/srcpkgs/python3-adblock/template

35 lines
1.2 KiB
Bash

# Template file for 'python3-adblock'
pkgname=python3-adblock
version=0.6.0
revision=5
build_style=python3-pep517
build_helper="rust"
make_check_args="-k not(test_required_python_version)"
#XXX: Does statically link against openssl
hostmakedepends="maturin pkg-config cargo openssl-devel"
makedepends="openssl-devel python3-devel rust-std"
depends="python3"
checkdepends="python3-pytest python3-toml"
short_desc="Brave's adblock library in Python"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="Apache-2.0, MIT"
homepage="https://github.com/ArniDagur/python-adblock"
changelog="https://raw.githubusercontent.com/ArniDagur/python-adblock/master/CHANGELOG.md"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=cdde5db640f1d9205785641665b79e6edb7c51092a68536bc4907560c71136b2
do_build() {
maturin build -o . --release --target "${RUST_TARGET}" --manylinux off
# Drop platform specifiers from the wheel; pip will refuse to install,
# e.g., an armv7l wheel on an aarch64 system even if the masterdir is
# armv7l. The wheel is correct; no need for name compatibility checks.
mkdir -p dist
mv adblock-${version}-*.whl dist/adblock-${version}-py3-none-any.whl
}
post_install() {
vlicense LICENSE-MIT
chmod 755 ${DESTDIR}/${py3_sitelib}/adblock/*.so
}