From 45f0e0a5c1551c10a8c49cd69b79298a8fbb894f Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 30 Sep 2011 21:02:15 +0200 Subject: [PATCH] new package: add package 'libcec' Signed-off-by: Stephan Raue --- packages/devel/libcec/build | 38 +++++++++++++++++++++++++++++++ packages/devel/libcec/install | 26 +++++++++++++++++++++ packages/devel/libcec/meta | 36 +++++++++++++++++++++++++++++ tools/mkpkg/mkpkg_libcec | 43 +++++++++++++++++++++++++++++++++++ 4 files changed, 143 insertions(+) create mode 100755 packages/devel/libcec/build create mode 100755 packages/devel/libcec/install create mode 100644 packages/devel/libcec/meta create mode 100755 tools/mkpkg/mkpkg_libcec diff --git a/packages/devel/libcec/build b/packages/devel/libcec/build new file mode 100755 index 0000000000..31c65a3880 --- /dev/null +++ b/packages/devel/libcec/build @@ -0,0 +1,38 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +# libcec fails to build with LTO optimization + strip_lto + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --disable-static \ + --enable-shared \ + +make + +$MAKEINSTALL diff --git a/packages/devel/libcec/install b/packages/devel/libcec/install new file mode 100755 index 0000000000..c9a841b2f5 --- /dev/null +++ b/packages/devel/libcec/install @@ -0,0 +1,26 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib + cp -P $PKG_BUILD/src/lib/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/devel/libcec/meta b/packages/devel/libcec/meta new file mode 100644 index 0000000000..86a8d7bcde --- /dev/null +++ b/packages/devel/libcec/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="libcec" +PKG_VERSION="c3f9951" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://libcec.pulse-eight.com/" +PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="udev" +PKG_BUILD_DEPENDS="toolchain udev" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="libCEC is an open-source dual licensed library designed for communicating with the Pulse-Eight USB - CEC Adaptor" +PKG_LONGDESC="libCEC is an open-source dual licensed library designed for communicating with the Pulse-Eight USB - CEC Adaptor." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/tools/mkpkg/mkpkg_libcec b/tools/mkpkg/mkpkg_libcec new file mode 100755 index 0000000000..f9493b79b2 --- /dev/null +++ b/tools/mkpkg/mkpkg_libcec @@ -0,0 +1,43 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +echo "getting sources..." + if [ ! -d libcec.git ]; then + git clone git://github.com/Pulse-Eight/libcec.git libcec.git + fi + + cd libcec.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf libcec-$GIT_REV + cp -R libcec.git libcec-$GIT_REV + +echo "cleaning sources..." + rm -rf libcec-$GIT_REV/.git + +echo "packing sources..." + tar cvJf libcec-$GIT_REV.tar.xz libcec-$GIT_REV + +echo "remove temporary sourcedir..." + rm -rf libcec-$GIT_REV