From 78787437271c2ad9eee65dbba4a9aa5142717cf2 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 27 Apr 2015 13:44:39 +0200 Subject: [PATCH] new package: add package 'dcadec' Signed-off-by: Stephan Raue --- packages/audio/dcadec/package.mk | 45 ++++++++++++++++++++++++++++ tools/mkpkg/mkpkg_dcadec | 51 ++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 packages/audio/dcadec/package.mk create mode 100755 tools/mkpkg/mkpkg_dcadec diff --git a/packages/audio/dcadec/package.mk b/packages/audio/dcadec/package.mk new file mode 100644 index 0000000000..cfd1cdce0f --- /dev/null +++ b/packages/audio/dcadec/package.mk @@ -0,0 +1,45 @@ +################################################################################ +# 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 . +################################################################################ + +PKG_NAME="dcadec" +PKG_VERSION="7b3b44c" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/foo86/dcadec" +PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS_TARGET="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="DTS Coherent Acoustics decoder with support for HD extensions" +PKG_LONGDESC="DTS Coherent Acoustics decoder with support for HD extensions" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +PKG_MAKE_OPTS_TARGET="PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/lib INCLUDEDIR=/usr/include PKG_CONFIG_PATH=/usr/lib/pkgconfig" +PKG_MAKEINSTALL_OPTS_TARGET="$PKG_MAKE_OPTS_TARGET" + +pre_configure_target() { + export CFLAGS="$CFLAGS -fPIC -DPIC" + export LDFLAGS="$LDFLAGS -fPIC -DPIC" +} + +post_makeinstall_target() { + rm -rf $INSTALL/usr/bin +} diff --git a/tools/mkpkg/mkpkg_dcadec b/tools/mkpkg/mkpkg_dcadec new file mode 100755 index 0000000000..dab542a234 --- /dev/null +++ b/tools/mkpkg/mkpkg_dcadec @@ -0,0 +1,51 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 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, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +echo "getting sources..." + if [ ! -d dcadec.git ]; then + git clone git@github.com:foo86/dcadec.git -b master dcadec.git + fi + + cd dcadec.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf dcadec-$GIT_REV + cp -R dcadec.git dcadec-$GIT_REV + +echo "creating VERSION and other needed files" + ( + cd dcadec-$GIT_REV + LC_ALL=C ./scripts/git-version > VERSION + touch ChangeLog + ) + +echo "cleaning sources..." + rm -rf dcadec-$GIT_REV/.git + + +echo "packing sources..." + tar cvJf dcadec-$GIT_REV.tar.xz dcadec-$GIT_REV + +echo "remove temporary sourcedir..." +