void-packages/srcpkgs/omxplayer/template

57 lines
1.3 KiB
Text

# Template file for 'omxplayer'
pkgname=omxplayer
version=20130807
revision=1
short_desc="Commandline OMX player for the Raspberry Pi"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="https://github.com/huceke/omxplayer"
# XXX only rpi
only_for_archs="armv6l"
hostmakedepends="pkg-config"
makedepends="rpi-firmware pcre-devel boost-devel freetype-devel ffmpeg-devel"
do_fetch() {
local url="git://github.com/popcornmix/omxplayer.git"
git clone $url ${pkgname}-${version}
}
pre_build() {
cp -f ${FILESDIR}/Makefile* .
./gen_version.sh > version.h
sed -e 's,\\n,,g' -i version.h
sed -e 's,/usr/share/fonts/truetype/freefont,/usr/share/fonts/TTF,g' -i omxplayer.cpp
}
do_build() {
mkdir -p /opt/vc/lib
if [ "$CROSS_BUILD" ]; then
INCLUDES="-I$XBPS_CROSS_BASE/include \
-I$XBPS_CROSS_BASE/include/freetype2"
LDFLAGS="-L$XBPS_CROSS_BASE/lib"
sed -e "s|@INCLUDES@|${INCLUDES}|g" -i Makefile.include
sed -e "s|@LDFLAGS@|${LDFLAGS}|g" -i Makefile.include
sed -e "s|@OPTBASE@|${XBPS_CROSS_BASE}/opt|g" -i Makefile.include
else
sed -e "s|@OPTBASE@|/opt|g" -i Makefile.include
fi
make CC="$CC" CXX="$CXX" LD="$LD"
}
do_install() {
make DESTDIR=${DESTDIR} install
}
omxplayer_package() {
depends="freefont-ttf"
pkg_install() {
vmove usr
}
}