tvheadend: convert to new package format

This commit is contained in:
Stefan Saraev 2014-01-05 12:28:43 +02:00
parent 8086fcd78f
commit 272cfd360a
3 changed files with 32 additions and 66 deletions

View File

@ -1,25 +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 $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $PKG_BUILD/build.linux/tvheadend $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $PKG_BUILD/capmt_ca.so $ADDON_BUILD/$PKG_ADDON_ID/bin

View File

@ -1,39 +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
# do not build with LTO support
strip_lto
cd $PKG_BUILD
./configure --prefix=/usr \
--arch=$TARGET_ARCH \
--cpu=$TARGET_CPU \
--cc=$TARGET_CC \
--enable-timeshift \
--disable-libav \
--disable-avahi \
--enable-bundle
make
# compile capmt_ca.so library
$CC -O -fbuiltin -fomit-frame-pointer -fPIC -shared -o capmt_ca.so src/extra/capmt_ca.c -ldl

View File

@ -24,8 +24,8 @@ PKG_LICENSE="GPL"
PKG_SITE="http://www.lonelycoder.com/hts/tvheadend_overview.html"
#PKG_URL="https://github.com/downloads/tvheadend/tvheadend/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS="openssl curl"
PKG_BUILD_DEPENDS="toolchain openssl curl"
PKG_DEPENDS_TARGET=""
PKG_BUILD_DEPENDS_TARGET="toolchain openssl curl"
PKG_PRIORITY="optional"
PKG_SECTION="service/multimedia"
PKG_SHORTDESC="tvheadend (Version: $PKG_VERSION): a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources."
@ -33,3 +33,33 @@ PKG_LONGDESC="Tvheadend (Version: $PKG_VERSION) is a TV streaming server for Lin
PKG_IS_ADDON="yes"
PKG_ADDON_TYPE="xbmc.service"
PKG_AUTORECONF="no"
pre_build_target() {
mkdir -p $PKG_BUILD/.$TARGET_NAME
cp -RP $PKG_BUILD/* $PKG_BUILD/.$TARGET_NAME
}
configure_target() {
./configure --prefix=/usr \
--arch=$TARGET_ARCH \
--cpu=$TARGET_CPU \
--cc=$TARGET_CC \
--enable-timeshift \
--disable-libav \
--disable-avahi \
--enable-bundle
}
post_make_target() {
$CC -O -fbuiltin -fomit-frame-pointer -fPIC -shared -o capmt_ca.so src/extra/capmt_ca.c -ldl
}
makeinstall_target() {
: # nothing to do here
}
addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $PKG_BUILD/.$TARGET_NAME/build.linux/tvheadend $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $PKG_BUILD/.$TARGET_NAME/capmt_ca.so $ADDON_BUILD/$PKG_ADDON_ID/bin
}