PKGBUILDs/alarm/kodi-imx-addon-visualization-spectrum/PKGBUILD

57 lines
1.8 KiB
Bash
Raw Normal View History

# $Id: PKGBUILD 195229 2016-11-09 18:46:09Z idevolder $
# Maintainer: BlackEagle <ike.devolder@gmail.com>>
# ALARM: Oleg Rakhmanov <oleg [at] archlinuxarm [dot] org>
# - Use CFLAGS, CXXFLAGS, CPPFLAGS, LDFLAGS from kodi-imx
# - Use -DLINUX flag to avoid "unrecognised platform" error
# - DUSE_LTO=0
# - Use -DOPENGL_INCLUDE_DIR=OPENGL_INCLUDE_DIR-NOTFOUND to disable OPENGL
# - Provide path to opengles{gl,egl} libraries for imx
buildarch=4
pkgname=kodi-imx-addon-visualization-spectrum
_commit=73c8786
pkgver=20161206.73c8786
pkgrel=2
pkgdesc="Spectrum visualizer for Kodi on imx platform"
arch=('armv7h')
url='https://github.com/notspiff/visualization.spectrum'
license=('GPL')
groups=('kodi-imx-addons' 'kodi-imx-addons-visualization')
depends=('kodi-imx' 'imx-gpu-viv-fb')
makedepends=('git' 'cmake')
source=("$pkgname::git://github.com/notspiff/visualization.spectrum.git#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
cd "$pkgname"
git log -1 --date=short --format="%cd.%h" | tr -d '-'
}
build() {
cd "$pkgname"
CFLAGS="-DLINUX -Ofast -mfloat-abi=hard -mfpu=neon -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -pipe -fstack-protector --param=ssp-buffer-size=4 -I/opt/fsl/include"
CXXFLAGS="${CFLAGS}"
CPPFLAGS+=" -I/opt/fsl/include"
LDFLAGS+=" -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib"
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=1 \
-DUSE_LTO=0 \
-DOPENGL_INCLUDE_DIR=OPENGL_INCLUDE_DIR-NOTFOUND \
-DOPENGLES2_INCLUDE_DIRS=/opt/fsl/include \
-DOPENGLES2_gl_LIBRARY=/opt/fsl/lib/libGLESv2.so \
-DOPENGLES2_egl_LIBRARY=/opt/fsl/lib/libEGL.so
make
}
package() {
cd "$pkgname"
make DESTDIR="$pkgdir/" install
}