# Contributor: RĂ³bert Nagy # Maintainer: Natanael Copa pkgname=libcec pkgver=4.0.2 pkgrel=1 pkgdesc="libcec for the Pulse-Eight USB-CEC adapter" url="https://github.com/Pulse-Eight/libcec" arch="all" license="GPL" depends="" depends_dev="eudev-dev python3-dev libxrandr-dev swig" makedepends="$depends_dev p8-platform-dev cmake" install="" subpackages="$pkgname-dev" source="https://github.com/Pulse-Eight/libcec/archive/libcec-$pkgver.tar.gz" builddir="$srcdir"/libcec-libcec-$pkgver prepare() { default_prepare # remove non linux binaries cd "$builddir" rm -r support } build() { mkdir "$builddir/build" cd "$builddir/build" cmake -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=1 \ -DCMAKE_INSTALL_PREFIX=/usr \ .. || return 1 make || return 1 } package() { cd "$builddir/build" make DESTDIR="$pkgdir" install || return 1 # Add cec directory to sys.path to get rid of issue https://github.com/Pulse-Eight/libcec/issues/316 python_dir=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") echo "cec" > "${pkgdir}${python_dir}/cec.pth" } md5sums="47892140fbda566f6a6f944b52eb44fd libcec-4.0.2.tar.gz" sha256sums="b8b8dd31f3ebdd5472f03ab7d401600ea0d959b1288b9ca24bf457ef60e2ba27 libcec-4.0.2.tar.gz" sha512sums="7bb80965cd1bef713f59bff136dc4a7f1172c4a9bdb8e2f59c6bcc5b74110848c0b2912263280ea68177908a688127e8d7208fc43ce6e65d589343b85395a0bb libcec-4.0.2.tar.gz"