void-packages/srcpkgs/libvpx6/template

59 lines
1.3 KiB
Bash

# Template file for 'libvpx6'
pkgname=libvpx6
version=1.8.0
revision=1
wrksrc=libvpx-${version}
hostmakedepends="perl yasm"
short_desc="VP8 and VP9 video codec"
maintainer="Juan RP <xtraeme@voidlinux.org>"
license="BSD-3-Clause-Clear"
homepage="http://www.webmproject.org"
distfiles="https://github.com/webmproject/libvpx/archive/v${version}.tar.gz"
checksum=86df18c694e1c06cc8f83d2d816e9270747a0ce6abe316e93a4f4095689373f6
replaces="libvpx<1.8.0"
do_configure() {
export LD="$CC"
if [ "$CROSS_BUILD" ]; then
case "$XBPS_TARGET_MACHINE" in
aarch64*) _cross="--target=arm64-linux-gcc";;
armv7*) _cross="--target=armv7-linux-gcc";;
*) _cross="--target=generic-gnu";;
esac
fi
CFLAGS+=" -fPIC"
./configure --enable-vp8 --enable-vp9 \
--enable-experimental \
--enable-runtime-cpu-detect --enable-shared \
--enable-postproc --enable-pic --disable-install-docs \
--disable-install-srcs --as=yasm ${_cross}
}
do_build() {
make ${makejobs}
}
do_install() {
make DIST_DIR=${DESTDIR}/usr install
vlicense LICENSE
}
libvpx-tools_package() {
short_desc+=" - tools"
pkg_install() {
vmove usr/bin
}
}
libvpx-devel_package() {
depends="libvpx6>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}