PKGBUILDs/alarm/libcec-imx6/PKGBUILD
2017-02-01 01:35:44 +00:00

60 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: Oleg Rakhmanov <oleg@archlinuxarm.org>
# - IMX support, no Exynos
# - IMX patches are a courtesy of OpenELEC:
# https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/devel/libcec/patches/
buildarch=4
pkgname=libcec-imx6
_pkgname=libcec
pkgver=4.0.2
pkgrel=1
pkgdesc="Pulse-Eight's libcec for the Pulse-Eight USB-CEC adapter (IMX6)"
arch=('armv7h')
url="http://libcec.pulse-eight.com/"
license=('GPL')
makedepends=('cmake')
depends=('udev' 'lockdev' 'p8-platform' 'libxrandr')
provides=('libcec')
conflicts=('libcec')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/Pulse-Eight/$_pkgname/archive/$_pkgname-$pkgver.tar.gz"
'libcec-00-imx6-support.patch')
sha256sums=('b8b8dd31f3ebdd5472f03ab7d401600ea0d959b1288b9ca24bf457ef60e2ba27'
'2f4ab0c1fb2b004ec4c797339451b9b145270de61c16b4d0dac882871e58390f')
prepare() {
cd "$_pkgname-$_pkgname-$pkgver"
patch -Np1 -i ../libcec-00-imx6-support.patch
}
build() {
cd "$_pkgname-$_pkgname-$pkgver"
unset LDFLAGS
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 \
-DHAVE_EXYNOS_API=0 \
-DHAVE_IMX_API=1 \
-DRPI_INCLUDE_DIR=/opt/vc/include \
-DRPI_LIB_DIR=/opt/vc/lib
make
}
package() {
cd "$_pkgname-$_pkgname-$pkgver/build"
make DESTDIR="$pkgdir" install
}