Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added debian package rules

  • Loading branch information...
commit fe9d50698912165445d6b790060033c58858c67d 1 parent 5e6cca2
Alexander Pipelka authored committed
1  .gitignore
View
@@ -1,3 +1,4 @@
*.o
.dependencies
*.so
+libvdr-vnsiserver.so*
77 Makefile
View
@@ -3,14 +3,9 @@
#
# $Id$
-# Allow console debug messages
-#CONSOLEDEBUG = 1
-
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
# By default the main source file also carries this name.
-# IMPORTANT: the presence of this macro is important for the Make.config
-# file. So it must be defined, even if it is not used here!
#
PLUGIN = vnsiserver
@@ -20,11 +15,12 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
### The C++ compiler and options:
-CXX ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+OPTLEVEL ?= 2
+CXXFLAGS = -O$(OPTLEVEL) -g -Wall -Woverloaded-virtual -fPIC -DPIC
### The directory environment:
+DVBDIR = ../../../../DVB
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
@@ -34,9 +30,9 @@ TMPDIR = /tmp
-include $(VDRDIR)/Make.config
-include $(VDRDIR)/Make.global
-### The version number of VDR's plugin API (taken from VDR's "config.h"):
+### The version number of VDR (taken from VDR's "config.h"):
-APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -45,71 +41,40 @@ PACKAGE = vdr-$(ARCHIVE)
### Includes and Defines (add further entries here):
-INCLUDES += -I$(VDRDIR)/include
-
-DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include -I$(VDRDIR)
-DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DVNSI_SERVER_VERSION='"$(VERSION)"'
-ifdef CONSOLEDEBUG
-DEFINES += -DCONSOLEDEBUG
-endif
-LIBS =
+DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DVNSI_SERVER_VERSION='"$(VERSION)"'
### The object files (add further files here):
OBJS = $(PLUGIN).o bitstream.o cmdcontrol.o connection.o config.o cxsocket.o demuxer.o demuxer_AAC.o \
- demuxer_AC3.o demuxer_DTS.o demuxer_h264.o demuxer_MPEGAudio.o demuxer_MPEGVideo.o \
- demuxer_Subtitle.o demuxer_Teletext.o receiver.o recplayer.o requestpacket.o responsepacket.o \
- server.o hash.o
-
-### The main target:
-
-all: libvdr-$(PLUGIN).so i18n
+ demuxer_AC3.o demuxer_DTS.o demuxer_h264.o demuxer_MPEGAudio.o demuxer_MPEGVideo.o \
+ demuxer_Subtitle.o demuxer_Teletext.o receiver.o recplayer.o requestpacket.o responsepacket.o \
+ server.o hash.o
### Implicit rules:
+all-redirect: all
+
%.o: %.c
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
-### Dependencies:
+# Dependencies:
-MAKEDEP = $(CXX) -MM -MG
+MAKEDEP = g++ -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE)
-### Internationalization (I18N):
-
-PODIR = po
-LOCALEDIR = $(VDRDIR)/locale
-I18Npo = $(wildcard $(PODIR)/*.po)
-I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
-I18Npot = $(PODIR)/$(PLUGIN).pot
-
-%.mo: %.po
- msgfmt -c -o $@ $<
-
-$(I18Npot): $(wildcard *.c)
- xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<see README>' -o $@ $^
-
-%.po: $(I18Npot)
- msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
- @touch $@
-
-$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
- @mkdir -p $(dir $@)
- cp $< $@
-
-.PHONY: i18n
-i18n: $(I18Nmsgs) $(I18Npot)
-
### Targets:
+all: libvdr-$(PLUGIN).so
+
libvdr-$(PLUGIN).so: $(OBJS)
- $(CXX) $(CXXFLAGS) -shared $(LIBS) $(OBJS) -o $@
- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
+ $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@@ -120,4 +85,8 @@ dist: clean
@echo Distribution package created as $(PACKAGE).tgz
clean:
- @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
+ @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
+
+install:
+ @install -d ../../man
+ @install README ../../man/$(PLUGIN).man
6 debian/.gitignore
View
@@ -0,0 +1,6 @@
+stamp-patched
+*.log
+*.substvars
+patched
+vdr-plugin-vnsiserver
+files
5 debian/changelog
View
@@ -0,0 +1,5 @@
+vdr-plugin-vnsiserver (0.0.1-1) unstable; urgency=low
+
+ * debianized
+
+ -- Alexander Pipelka <alexander.pipelka@gmail.com> Wed, 16 Mar 2011 09:23:00 +0200
1  debian/compat
View
@@ -0,0 +1 @@
+5
1  debian/conffiles
View
@@ -0,0 +1 @@
+/var/lib/vdr/plugins/vnsiserver/allowed_hosts.conf
12 debian/control
View
@@ -0,0 +1,12 @@
+Source: vdr-plugin-vnsiserver
+Section: misc
+Priority: extra
+Maintainer: Alexander Pipelka <alexander.pipelka@gmail.com>
+Build-Depends: debhelper (>= 5), cdbs, dpatch, vdr-dev (>= 1.6.0)
+Standards-Version: 3.8.0
+
+Package: vdr-plugin-vnsiserver
+Architecture: any
+Depends: ${shlibs:Depends}, ${vdr:Depends}
+Description: XBMC VNSI plugin for VDR
+ This plugin for VDR allows XBMC clients to connect.
4 debian/copyright
View
@@ -0,0 +1,4 @@
+Copyright:
+
+It may be redistributed under the terms of the GNU GPL, Version 2
+found on Debian systems in the file /usr/share/common-licenses/GPL .
1  debian/docs
View
@@ -0,0 +1 @@
+README
3  debian/install
View
@@ -0,0 +1,3 @@
+libvdr-vnsiserver.so.* usr/lib/vdr/plugins/
+debian/plugin.vnsiserver.conf etc/vdr/plugins/
+vnsiserver/allowed_hosts.conf var/lib/vdr/plugins/vnsiserver/
2  debian/patches/00list
View
@@ -0,0 +1,2 @@
+01_Makefile
+90_APIVERSION
27 debian/patches/01_Makefile.dpatch
View
@@ -0,0 +1,27 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+
+## 01_Makefile.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Move installation of README and man page from all to install.
+
+@DPATCH@
+--- osdteletext.orig/Makefile
++++ osdteletext/Makefile
+@@ -67,8 +67,6 @@
+ ### Targets:
+
+ all: libvdr-$(PLUGIN).so
+- @install -d ../../man
+- @install README ../../man/$(PLUGIN).man
+
+ libvdr-$(PLUGIN).so: $(OBJS)
+ $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
+@@ -84,3 +82,7 @@
+
+ clean:
+ @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
++
++install:
++ @install -d ../../man
++ @install README ../../man/$(PLUGIN).man
20 debian/patches/90_APIVERSION.dpatch
View
@@ -0,0 +1,20 @@
+#! /bin/sh -e
+## 90_APIVERSION.dpatch by Thomas Günther <tom@toms-cafe.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Support for the APIVERSION define as introduced in VDR-1.3.47.
+
+case "$1" in
+ -patch)
+ sed -i -e s/VDRVERSION/APIVERSION/g Makefile
+ ;;
+ -unpatch)
+ sed -i -e s/APIVERSION/VDRVERSION/g Makefile
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+ ;;
+esac
+
+exit 0
1  debian/plugin.vnsiserver.conf
View
@@ -0,0 +1 @@
+-t 10
19 debian/rules
View
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/vdr-dev/make-special-vdr.sh
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+
+DEB_INSTALL_CHANGELOGS_ALL = HISTORY
+
+MAKE_OPTIONS = DVBDIR=/usr VDRDIR=/usr/include/vdr LIBDIR=.
+
+common-build-arch::
+ $(MAKE) all $(MAKE_OPTIONS)
+
+clean::
+ $(MAKE) -o .dependencies clean $(MAKE_OPTIONS)
+ rm -f libvdr-*.so.*
+
+common-binary-predeb-arch::
+ sh /usr/share/vdr-dev/dependencies.sh
+
118 project/VNSI Server.cbp
View
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_project_file>
- <FileVersion major="1" minor="6" />
- <Project>
- <Option title="VNSI Server" />
- <Option pch_mode="2" />
- <Option compiler="gcc" />
- <Build>
- <Target title="Release">
- <Option output="bin\Release\VNSI Server" prefix_auto="1" extension_auto="1" />
- <Option object_output="obj\Release\" />
- <Option type="1" />
- <Option compiler="gcc" />
- <Compiler>
- <Add option="-O2" />
- </Compiler>
- <Linker>
- <Add option="-s" />
- </Linker>
- </Target>
- </Build>
- <Compiler>
- <Add option="-Wall" />
- </Compiler>
- <Unit filename="..\COPYING" />
- <Unit filename="..\HISTORY" />
- <Unit filename="..\Makefile" />
- <Unit filename="..\README" />
- <Unit filename="..\bitstream.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\bitstream.h" />
- <Unit filename="..\cmdcontrol.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\cmdcontrol.h" />
- <Unit filename="..\config.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\config.h" />
- <Unit filename="..\connection.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\connection.h" />
- <Unit filename="..\cxsocket.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\cxsocket.h" />
- <Unit filename="..\demuxer.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\demuxer.h" />
- <Unit filename="..\demuxer_AC3.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\demuxer_AC3.h" />
- <Unit filename="..\demuxer_MPEGAudio.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\demuxer_MPEGAudio.h" />
- <Unit filename="..\demuxer_MPEGVideo.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\demuxer_MPEGVideo.h" />
- <Unit filename="..\demuxer_Subtitle.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\demuxer_Subtitle.h" />
- <Unit filename="..\demuxer_Teletext.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\demuxer_Teletext.h" />
- <Unit filename="..\demuxer_h264.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\demuxer_h264.h" />
- <Unit filename="..\global.h" />
- <Unit filename="..\receiver.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\receiver.h" />
- <Unit filename="..\recplayer.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\recplayer.h" />
- <Unit filename="..\requestpacket.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\requestpacket.h" />
- <Unit filename="..\responsepacket.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\responsepacket.h" />
- <Unit filename="..\server.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\server.h" />
- <Unit filename="..\suspend.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\suspend.dat" />
- <Unit filename="..\suspend.h" />
- <Unit filename="..\tools.c">
- <Option compilerVar="CC" />
- </Unit>
- <Unit filename="..\tools.h" />
- <Unit filename="..\vdrcommand.h" />
- <Unit filename="..\vnsiserver.c">
- <Option compilerVar="CC" />
- </Unit>
- <Extensions>
- <code_completion />
- <envvars />
- <debugger />
- <lib_finder disable_auto="1" />
- </Extensions>
- </Project>
-</CodeBlocks_project_file>
76 project/VNSI Server.layout
View
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_layout_file>
- <ActiveTarget name="Release" />
- <File name="..\bitstream.h" open="0" top="0" tabpos="0">
- <Cursor position="877" topLine="3" />
- </File>
- <File name="..\cmdcontrol.c" open="1" top="0" tabpos="8">
- <Cursor position="32866" topLine="769" />
- </File>
- <File name="..\cmdcontrol.h" open="1" top="0" tabpos="9">
- <Cursor position="1762" topLine="39" />
- </File>
- <File name="..\config.h" open="1" top="0" tabpos="5">
- <Cursor position="1237" topLine="0" />
- </File>
- <File name="..\connection.c" open="1" top="1" tabpos="7">
- <Cursor position="5049" topLine="171" />
- </File>
- <File name="..\connection.h" open="1" top="0" tabpos="10">
- <Cursor position="1909" topLine="33" />
- </File>
- <File name="..\demuxer.c" open="1" top="0" tabpos="1">
- <Cursor position="5993" topLine="237" />
- </File>
- <File name="..\demuxer.h" open="1" top="0" tabpos="3">
- <Cursor position="6229" topLine="180" />
- </File>
- <File name="..\demuxer_AC3.c" open="0" top="0" tabpos="0">
- <Cursor position="1086" topLine="0" />
- </File>
- <File name="..\demuxer_AC3.h" open="0" top="0" tabpos="0">
- <Cursor position="1228" topLine="0" />
- </File>
- <File name="..\demuxer_MPEGAudio.c" open="0" top="0" tabpos="6">
- <Cursor position="1584" topLine="18" />
- </File>
- <File name="..\demuxer_MPEGAudio.h" open="0" top="0" tabpos="7">
- <Cursor position="1325" topLine="26" />
- </File>
- <File name="..\demuxer_MPEGVideo.c" open="0" top="0" tabpos="8">
- <Cursor position="6977" topLine="210" />
- </File>
- <File name="..\demuxer_MPEGVideo.h" open="0" top="0" tabpos="9">
- <Cursor position="1190" topLine="24" />
- </File>
- <File name="..\demuxer_Subtitle.c" open="0" top="0" tabpos="0">
- <Cursor position="1116" topLine="0" />
- </File>
- <File name="..\demuxer_Subtitle.h" open="0" top="0" tabpos="0">
- <Cursor position="1263" topLine="0" />
- </File>
- <File name="..\demuxer_Teletext.c" open="0" top="0" tabpos="0">
- <Cursor position="1116" topLine="0" />
- </File>
- <File name="..\demuxer_Teletext.h" open="0" top="0" tabpos="0">
- <Cursor position="1265" topLine="0" />
- </File>
- <File name="..\demuxer_h264.c" open="0" top="0" tabpos="0">
- <Cursor position="1092" topLine="0" />
- </File>
- <File name="..\demuxer_h264.h" open="0" top="0" tabpos="0">
- <Cursor position="1235" topLine="0" />
- </File>
- <File name="..\receiver.c" open="1" top="0" tabpos="2">
- <Cursor position="4605" topLine="178" />
- </File>
- <File name="..\receiver.h" open="1" top="0" tabpos="4">
- <Cursor position="2780" topLine="42" />
- </File>
- <File name="..\recplayer.c" open="1" top="0" tabpos="11">
- <Cursor position="3882" topLine="167" />
- </File>
- <File name="..\vdrcommand.h" open="1" top="0" tabpos="6">
- <Cursor position="3061" topLine="66" />
- </File>
-</CodeBlocks_layout_file>
14 receiver.c
View
@@ -36,11 +36,11 @@
#include "vdrcommand.h"
#include "responsepacket.h"
-#if VDRVERSNUM < 10713
+/*#if VDRVERSNUM < 10713
#ifndef PLUGINPARAMPATCHVERSNUM
#error "You must apply the pluginparam patch for VDR!"
#endif
-#endif
+#endif*/
static uint64_t get_ticks() {
uint64_t ticks;
@@ -804,12 +804,7 @@ bool cLiveStreamer::StreamChannel(const cChannel *channel, int priority, cxSocke
resp->finalise();
m_Socket->write(resp->getPtr(), resp->getLen());
-#if VDRVERSNUM < 10713
- if (m_Channel && m_Channel->IsPlug()) m_IsMPEGPS = true;
-#else
- // TODO: rework cPvrSourceParams for use with older vdr
if (m_Channel && ((m_Channel->Source() >> 24) == 'V')) m_IsMPEGPS = true;
-#endif
if (m_NumStreams > 0 && m_Socket)
{
@@ -1018,12 +1013,7 @@ void cLiveStreamer::sendSignalInfo()
return;
}
-#if VDRVERSNUM < 10713
- if (m_Channel && m_Channel->IsPlug())
-#else
- // TODO: rework cPvrSourceParams for use with older vdr
if (m_Channel && ((m_Channel->Source() >> 24) == 'V'))
-#endif
{
if (m_Frontend < 0)
{
Please sign in to comment.
Something went wrong with that request. Please try again.