Skip to content

Commit

Permalink
Merge pull request #234 from lrusak/dvb-tools
Browse files Browse the repository at this point in the history
dvb-tools: initial add-on
  • Loading branch information
chewitt committed Apr 29, 2016
2 parents b3dd8bc + 8b1c5a4 commit 5d50c4a
Show file tree
Hide file tree
Showing 13 changed files with 363 additions and 0 deletions.
@@ -0,0 +1,35 @@
################################################################################
# This file is part of LibreELEC - http://www.libreelec.tv
# Copyright (C) 2016 Team LibreELEC
#
# LibreELEC 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.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

PKG_NAME="bitstream"
PKG_VERSION="1.1"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.videolan.org"
PKG_URL="http://download.videolan.org/pub/videolan/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="multimedia"
PKG_SHORTDESC="biTStream is a set of C headers allowing a simpler access to binary structures such as specified by MPEG, DVB, IETF, etc."
PKG_LONGDESC="biTStream is a set of C headers allowing a simpler access to binary structures such as specified by MPEG, DVB, IETF, etc."

PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

PKG_MAKEINSTALL_OPTS_TARGET="PREFIX=/usr"
@@ -0,0 +1,35 @@
################################################################################
# This file is part of LibreELEC - http://www.libreelec.tv
# Copyright (C) 2016 Team LibreELEC
#
# LibreELEC 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.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

PKG_NAME="libev"
PKG_VERSION="4.22"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://software.schmorp.de/pkg/libev.html"
PKG_URL="http://dist.schmorp.de/libev/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="multimedia"
PKG_SHORTDESC="libev: a full-featured and high-performance event loop"
PKG_LONGDESC="A full-featured and high-performance event loop that is loosely modelled after libevent, but without its limitations and bugs."

PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"

PKG_CONFIGURE_OPTS_TARGET="--disable-shared --enable-static"
@@ -0,0 +1,42 @@
################################################################################
# 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
################################################################################

PKG_NAME="dvb-apps"
PKG_VERSION="3d43b280298c"
PKG_REV="0"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://www.linuxtv.org/wiki/index.php/LinuxTV_dvb-apps"
PKG_URL="http://linuxtv.org/hg/dvb-apps/archive/${PKG_VERSION}.tar.bz2"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="tools"
PKG_SHORTDESC="Digitial Video Broadcasting (DVB) applications"
PKG_LONGDESC="Applications and utilities geared towards the initial setup, testing and operation of an DVB device supporting the DVB-S, DVB-C, DVB-T, and ATSC standards."
PKG_AUTORECONF="no"

make_target() {
make -C lib
make -C util
}

makeinstall_target() {
: # nop
}
@@ -0,0 +1,11 @@
diff -Naur dvb-apps-20090201/util/scan/diseqc.c dvb-apps-20090201a/util/scan/diseqc.c
--- dvb-apps-20090201/util/scan/diseqc.c 2009-02-01 13:57:16.000000000 +0100
+++ dvb-apps-20090201a/util/scan/diseqc.c 2009-02-14 13:45:42.000000000 +0100
@@ -1,6 +1,6 @@
+#include <time.h>
#include <linux/dvb/frontend.h>
#include <sys/ioctl.h>
-#include <time.h>

#include "scan.h"
#include "diseqc.h"
@@ -0,0 +1,13 @@
diff --git a/Make.rules b/Make.rules
index e867c3a..b2d8663 100644
--- a/Make.rules
+++ b/Make.rules
@@ -9,7 +9,7 @@ ifneq ($(lib_name),)
CFLAGS_LIB ?= -fPIC
CFLAGS += $(CFLAGS_LIB)

-libraries = $(lib_name).so $(lib_name).a
+libraries = $(lib_name).a

.PHONY: library

@@ -0,0 +1,11 @@
diff -Naur a/util/Makefile b/util/Makefile
--- a/util/Makefile 2014-03-21 12:26:36.000000000 -0700
+++ b/util/Makefile 2015-12-21 01:12:10.261957235 -0800
@@ -4,7 +4,6 @@

all clean install:
$(MAKE) -C atsc_epg $@
- $(MAKE) -C av7110_loadkeys $@
$(MAKE) -C dib3000-watch $@
$(MAKE) -C dst-utils $@
$(MAKE) -C dvbdate $@
@@ -0,0 +1,63 @@
################################################################################
# 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
################################################################################

PKG_NAME="dvb-fe-tool"
PKG_VERSION="fa2f7d9"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://linuxtv.org/"
PKG_URL="https://git.linuxtv.org/cgit.cgi/v4l-utils.git/snapshot/$PKG_VERSION.tar.xz"
PKG_SOURCE_DIR="$PKG_VERSION*"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="tools"
PKG_SHORTDESC="dvb-fe-tool: Linux V4L2 and DVB API utilities and v4l libraries (libv4l)."
PKG_LONGDESC="Linux V4L2 and DVB API utilities and v4l libraries (libv4l)."
PKG_AUTORECONF="yes"

PKG_CONFIGURE_OPTS_TARGET="--disable-nls \
--disable-rpath \
--disable-libdvbv5 \
--disable-libv4l \
--disable-v4l-utils \
--disable-qv4l2 \
--without-jpeg \
--without-libiconv-prefix \
--without-libintl-prefix"

post_patch() {
mkdir -p $ROOT/$PKG_BUILD/build-aux/
touch $ROOT/$PKG_BUILD/build-aux/config.rpath
touch $ROOT/$PKG_BUILD/libdvbv5-po/Makefile.in.in
touch $ROOT/$PKG_BUILD/v4l-utils-po/Makefile.in.in
}

make_target() {
cd $ROOT/$PKG_BUILD/.$TARGET_NAME/lib/libdvbv5
make CFLAGS="$TARGET_CFLAGS"

cd $ROOT/$PKG_BUILD/.$TARGET_NAME/utils/dvb
make CFLAGS="$TARGET_CFLAGS"
}

makeinstall_target() {
: # nop
}
43 changes: 43 additions & 0 deletions packages/addons/addon-depends/dvb-tools-depends/dvblast/package.mk
@@ -0,0 +1,43 @@
################################################################################
# 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
################################################################################

PKG_NAME="dvblast"
PKG_VERSION="3.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.videolan.org"
PKG_URL="http://downloads.videolan.org/pub/videolan/dvblast/${PKG_VERSION}/dvblast-${PKG_VERSION}.tar.bz2"
PKG_DEPENDS_TARGET="toolchain bitstream libev"
PKG_PRIORITY="optional"
PKG_SECTION="tools"
PKG_SHORTDESC="DVBlast is a simple and powerful MPEG-2/TS demux and streaming application"
PKG_LONGDESC="DVBlast is a simple and powerful MPEG-2/TS demux and streaming application"
PKG_AUTORECONF="no"

MAKEFLAGS="V=1"

pre_configure_target() {
export LDFLAGS="$LDFLAGS -lm"
}

makeinstall_target() {
: # nop
}
@@ -0,0 +1,17 @@
diff -Naur dvblast-3.0/Makefile dvblast-3.0.patch/Makefile
--- dvblast-3.0/Makefile 2015-10-05 17:51:14.000000000 +0200
+++ dvblast-3.0.patch/Makefile 2016-03-26 22:54:59.953303040 +0100
@@ -55,11 +55,11 @@

dvblast: $(OBJ_DVBLAST)
@echo "LINK $@"
- $(Q)$(CROSS)$(CC) -o $@ $(OBJ_DVBLAST) $(LDLIBS_DVBLAST) $(LDLIBS)
+ $(Q)$(CROSS)$(CC) -o $@ $(OBJ_DVBLAST) $(LDFLAGS) $(LDLIBS_DVBLAST) $(LDLIBS)

dvblastctl: $(OBJ_DVBLASTCTL)
@echo "LINK $@"
- $(Q)$(CROSS)$(CC) -o $@ $(OBJ_DVBLASTCTL) $(LDLIBS)
+ $(Q)$(CROSS)$(CC) -o $@ $(OBJ_DVBLASTCTL) $(LDFLAGS) $(LDLIBS)

clean:
@echo "CLEAN $(CLEAN_OBJS)"
2 changes: 2 additions & 0 deletions packages/addons/tools/dvb-tools/changelog.txt
@@ -0,0 +1,2 @@
8.0.100
- Initial Release
Binary file added packages/addons/tools/dvb-tools/icon/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions packages/addons/tools/dvb-tools/package.mk
@@ -0,0 +1,69 @@
################################################################################
# This file is part of LibreELEC - http://www.libreelec.tv
# Copyright (C) 2016 Team LibreELEC
#
# LibreELEC 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.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

PKG_NAME="dvb-tools"
PKG_VERSION=""
PKG_REV="100"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE=""
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="virtual"
PKG_SHORTDESC="A bundle of dvb tools and programs"
PKG_LONGDESC="A bundle of dvb tools and programs"

PKG_IS_ADDON="yes"
PKG_ADDON_NAME="DVB Tools"
PKG_ADDON_TYPE="xbmc.python.script"
PKG_ADDON_PROVIDES=""
PKG_ADDON_REPOVERSION="8.0"

PKG_AUTORECONF="no"

PKG_DEPENDS_TARGET="toolchain \
dvb-apps \
dvb-fe-tool \
dvblast"

addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib/

mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin/
# dvb-apps
cp -P $(get_build_dir dvb-apps)/util/dvbdate/dvbdate $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/dvbnet/dvbnet $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/dvbscan/dvbscan $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/dvbtraffic/dvbtraffic $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/femon/femon $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/scan/scan $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/szap/azap $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/szap/czap $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/szap/szap $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/szap/tzap $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $(get_build_dir dvb-apps)/util/zap/zap $ADDON_BUILD/$PKG_ADDON_ID/bin

# dvb-de-tool
cp -P $(get_build_dir dvb-fe-tool)/.$TARGET_NAME/utils/dvb/dvb-fe-tool $ADDON_BUILD/$PKG_ADDON_ID/bin

# dvblast
cp -P $(get_build_dir dvblast)/dvblast $ADDON_BUILD/$PKG_ADDON_ID/bin

debug_strip $ADDON_BUILD/$PKG_ADDON_ID/bin
}
22 changes: 22 additions & 0 deletions packages/addons/tools/dvb-tools/source/default.py
@@ -0,0 +1,22 @@
################################################################################
# This file is part of LibreELEC - http://www.libreelec.tv
# Copyright (C) 2016 Team LibreELEC
#
# LibreELEC 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.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

import xbmcgui

dialog = xbmcgui.Dialog()
dialog.ok('', 'This is a console-only addon')

0 comments on commit 5d50c4a

Please sign in to comment.