PKGBUILDs/community/libcec/PKGBUILD
2016-11-26 20:55:10 +00:00

59 lines
1.6 KiB
Bash

# $Id$
# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: Philippe Cherel <philippe.cherel@mayenne.org>
# vim: ft=sh:
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - Exynos support on v7
# - Amlogic support on v8
# - upstream commit to fix AOCEC build
buildarch=14
pkgname=libcec
pkgver=4.0.0
pkgrel=1
pkgdesc="Pulse-Eight's libcec for the Pulse-Eight USB-CEC adapter"
arch=('i686' 'x86_64')
url="http://libcec.pulse-eight.com/"
license=('GPL')
makedepends=('cmake')
depends=('udev' 'lockdev' 'p8-platform' 'libxrandr')
source=("$pkgname-$pkgver.tar.gz::https://github.com/Pulse-Eight/$pkgname/archive/$pkgname-$pkgver.tar.gz"
'https://github.com/Pulse-Eight/libcec/commit/399e177a56fc4b216ee6e7fb400c03c9b91be283.patch')
sha256sums=('4c6ee8e44f2e6b28e3dfbee6c77df8d18605150ef69ab0564728b79a92a646ed'
'd5faf272bce29942286dc44daa51d0480629f6818ae011379d1e4b73dd373cca')
prepare() {
cd "$pkgname-$pkgname-$pkgver"
patch -p1 -i ../399e177a56fc4b216ee6e7fb400c03c9b91be283.patch
}
build() {
cd "$pkgname-$pkgname-$pkgver"
if [[ $CARCH == 'armv7h' ]]; then
CONFIG='-DHAVE_EXYNOS_API=1'
fi
if [[ $CARCH == 'aarch64' ]]; then
CONFIG='-DHAVE_AOCEC_API=1'
fi
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=1 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_INSTALL_LIBDIR_NOARCH=/usr/lib \
${CONFIG}
make
}
package() {
cd "$pkgname-$pkgname-$pkgver/build"
make DESTDIR="$pkgdir" install
}