crystalhd: convert to new package format

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2014-01-26 23:48:29 +01:00
parent b09ed550cb
commit 28cb883a7d
3 changed files with 31 additions and 71 deletions

View File

@ -1,35 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
. config/options $1
cd $PKG_BUILD/driver/linux
autoreconf -vif
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--with-kernel-path=$(kernel_path) \
LDFLAGS="" make V=1
cd ../../linux_lib/libcrystalhd
make BCGCC=$TARGET_CXX
$MAKEINSTALL

View File

@ -1,33 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
. config/options $1
mkdir -p $INSTALL/lib/firmware
cp $PKG_BUILD/firmware/fwbin/*/*.bin $INSTALL/lib/firmware
mkdir -p $INSTALL/usr/lib
cp -P $PKG_BUILD/linux_lib/libcrystalhd/*.so* $INSTALL/usr/lib
mkdir -p $INSTALL/lib/udev/rules.d
cp $PKG_BUILD/driver/linux/*.rules $INSTALL/lib/udev/rules.d
mkdir -p $INSTALL/lib/modules/$(get_module_dir)/crystalhd
cp $PKG_BUILD/driver/linux/crystalhd.ko $INSTALL/lib/modules/$(get_module_dir)/crystalhd

View File

@ -23,13 +23,41 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://git.linuxtv.org/jarod/crystalhd.git"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS="linux"
PKG_BUILD_DEPENDS="toolchain linux"
PKG_DEPENDS_TARGET="linux"
PKG_BUILD_DEPENDS_TARGET="toolchain linux"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_PRIORITY="optional"
PKG_SECTION="multimedia"
PKG_SHORTDESC="crystalhd: OSX and Linux driver and library support for the Broadcom Crystal HD Video Accelerator."
PKG_LONGDESC="OSX and Linux driver and library support for the Broadcom Crystal HD Video Accelerator. Supported under XBMC for Mac on the AppleTV and under 10.4 and 10.5 OSX platforms."
PKG_IS_ADDON="no"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
pre_configure_target() {
cd driver/linux
autoreconf -vif
}
configure_target() {
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--with-kernel-path=$(kernel_path)
}
make_target() {
LDFLAGS="" make V=1
cd $ROOT/$PKG_BUILD/linux_lib/libcrystalhd
make BCGCC=$TARGET_CXX
}
post_makeinstall_target() {
cd $ROOT/$PKG_BUILD
mkdir -p $INSTALL/lib/udev/rules.d
cp driver/linux/*.rules $INSTALL/lib/udev/rules.d
mkdir -p $INSTALL/lib/modules/$(get_module_dir)/crystalhd
cp driver/linux/crystalhd.ko $INSTALL/lib/modules/$(get_module_dir)/crystalhd
}