60 lines
1.3 KiB
Text
60 lines
1.3 KiB
Text
# Template file for 'libcec'
|
|
pkgname=libcec
|
|
version=2.1.1
|
|
revision=1
|
|
wrksrc="${pkgname}-${pkgname}-${version}"
|
|
short_desc="USB CEC Adapter communication Library"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
homepage="https://github.com/Pulse-Eight/libcec"
|
|
license="GPL-2"
|
|
distfiles="https://github.com/Pulse-Eight/libcec/archive/libcec-${version}.tar.gz"
|
|
checksum=f61378798d900d496ed3a5ff7747b0bb35bdfec9b5c4168dcea38396e3569bf1
|
|
|
|
hostmakedepends="automake pkg-config"
|
|
makedepends="libudev-devel lockdev-devel"
|
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then
|
|
makedepends+=" rpi-firmware"
|
|
fi
|
|
|
|
pre_configure() {
|
|
autoreconf -fi
|
|
}
|
|
|
|
do_configure() {
|
|
local _rpiargs
|
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then
|
|
_rpiargs="--enable-rpi"
|
|
if [ "$XBPS_CROSS_BASE" ]; then
|
|
_rpiargs+=" --with-rpi-include-path=${XBPS_CROSS_BASE}/opt/vc/include"
|
|
_rpiargs+=" --with-rpi-lib-path=${XBPS_CROSS_BASE}/opt/vc/lib"
|
|
else
|
|
_rpiargs+=" --with-rpi-include-path=/opt/vc/include"
|
|
_rpiargs+=" --with-rpi-lib-path=/opt/vc/lib"
|
|
fi
|
|
fi
|
|
./configure ${CONFIGURE_SHARED_ARGS} ${_rpiargs} LDFLAGS=
|
|
}
|
|
|
|
do_build() {
|
|
make ${makejobs}
|
|
}
|
|
|
|
do_install() {
|
|
make DESTDIR=${DESTDIR} install
|
|
}
|
|
|
|
cec-client_package() {
|
|
depends="libcec>=${version}"
|
|
short_desc="${short_desc} -- client tool"
|
|
pkg_install() {
|
|
vmove usr/bin
|
|
}
|
|
}
|
|
|
|
libcec_package() {
|
|
pkg_install() {
|
|
vmove usr
|
|
}
|
|
}
|