Author Topic: VDR integration - How to add plugins  (Read 8363 times)

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR integration - How to add plugins
« Reply #15 on: July 01, 2008, 08:18:18 am »
Hi Col,

Yes, I built vdr-plugin-lcdproc from the sources. The steps are following:
- download and unpack vdr-plugin-lcdproc sources and Debian patch from the Ubuntu site;
- apply Debian patch to the plugin directory;
- install VDR headers (vdr-dev) and a few development packages such g++, debian-helper, fakeroot etc;
- go to plugin directory and run
Code: [Select]
dpkg-buildpackage -rfakeroot
As result you should get vdr-plugin-lcdproc package. After installation of that plugin you should modify /etc/vdr/plugins/order.conf to put it on the bottom. Here is my order.conf:
Code: [Select]
xineliboutput
control
streamdev-server
weather
prefermenu
lcdproc
Otherwise you VDR will crash after start.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: VDR integration - How to add plugins
« Reply #16 on: July 02, 2008, 03:43:10 am »
Sorry michael, some mor dumb questions:

What Debian patch? I haven't downloaded the vdr-plugin-lcdproc source yet, will it be obvious which patch when I do so?
How do I "apply" the Debian patch, and where is the "plugin" directory?
install VDR headers = sudo apt-get install vdr-dev?
You say "a few development packages" and list a few - could you be more specific :) just the 3 you mention? How do I tell exactly which ones are needed?

Col.

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR integration - How to add plugins
« Reply #17 on: July 02, 2008, 11:36:20 am »
1. Download plugin sources:
Code: [Select]
wget http://archive.ubuntu.com/ubuntu/pool/universe/v/vdr-plugin-lcdproc/vdr-plugin-lcdproc_0.0.10.orig.tar.gz2. Download debian patch:
Code: [Select]
wget http://archive.ubuntu.com/ubuntu/pool/universe/v/vdr-plugin-lcdproc/vdr-plugin-lcdproc_0.0.10-30ubuntu3.diff.gz3. Untar plugin sources in /tmp
Code: [Select]
tar vzxf vdr-plugin-lcdproc_0.0.10.orig.tar.gz -C /tmp4. Unzip debian patch
Code: [Select]
gzip -d vdr-plugin-lcdproc_0.0.10-30ubuntu3.diff.gz4. Go to plugin directory:
Code: [Select]
cd /tmp/lcdproc-0.0.105. Apply the patch
Code: [Select]
patch -p1 < ../vdr-plugin-lcdproc_0.0.10-30ubuntu3.diff6 . Install VDR headers
Code: [Select]
sudo apt-get install vdr-dev7. Install development packages:
Code: [Select]
sudo apt-get install build-essentialThe rest packages should be installed automatically
8. Build package:
Code: [Select]
dpkg-buildpackage -rfakerootIf you will have some errors about missing packages during building procedure just install them.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: VDR integration - How to add plugins
« Reply #18 on: July 02, 2008, 03:31:03 pm »
Michael - thank you very much for the detailed instructions! I got all the way through to the dpkg-buildpackage command, and had a couple of packages it errored on, as you suggested. So I apt-get installed (dpatch and fakeroot).... these installed fine...

Then I ran the command again and got:

dcerouter_80734:/home/linuxmce/vdrlcdproc# dpkg-buildpackage -rfakeroot
dpkg-buildpackage: source package is vdr-plugin-lcdproc
dpkg-buildpackage: source version is 0.0.10-30ubuntu3
dpkg-buildpackage: source changed by Timo Aaltonen <tepsipakki@ubuntu.com>
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: source version without epoch 0.0.10-30ubuntu3
 fakeroot debian/rules clean
/usr/bin/fakeroot: line 164: debian/rules: Permission denied
dcerouter_80734:/home/linuxmce/vdrlcdproc#

I have looked at that line in the file and have no idea why it is causing a permission denied error. As you can see, I even sudo -i first to be sure, but it does the same thing just from linuxmce and with a sudo in front of the command. I suggestions?

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR integration - How to add plugins
« Reply #19 on: July 02, 2008, 09:09:30 pm »
No problems, Colin ;)
Just do that:
Code: [Select]
chmod +x debian/rules
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: VDR integration - How to add plugins
« Reply #20 on: July 03, 2008, 12:26:02 am »
Silly me, didn't realise debian/rules was a folder/file, was reading it as a sentence! Fixed that up and built, but it comes up with more errors that I am ill-equiped to understand/debug!

The only clue I can see is it seems to be complaining about the directory name I created (vdrlcdproc) - looks like it might expect it to be different and is using it to locate a .orig file?? Not sure what it is expecting, so I will tell you what I did. I just created a directory called vdrlcdproc under the linuxmce home folder for the plugin. Then saw you talking about expanding the patch into /tmp. So I did that. Where should they both be and called? Is this what is confusing it?

linuxmce@dcerouter:~/vdrlcdproc$ chmod +x debian/rules
linuxmce@dcerouter:~/vdrlcdproc$ dpkg-buildpackage -rfakeroot
dpkg-buildpackage: source package is vdr-plugin-lcdproc
dpkg-buildpackage: source version is 0.0.10-30ubuntu3
dpkg-buildpackage: source changed by Timo Aaltonen <tepsipakki@ubuntu.com>
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: source version without epoch 0.0.10-30ubuntu3
 fakeroot debian/rules clean
/usr/share/vdr-dev/make-special-vdr.sh debian/rules clean SPECIAL_VDR_SUFFIX='' MAKE_SPECIAL_VDR='' NO_CHECKBUILDDEPS=''
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
/usr/bin/make -o .dependencies clean DVBDIR=/usr VDRDIR=/usr/include/vdr LIBDIR=.
make[1]: Entering directory `/home/linuxmce/vdrlcdproc'
make[1]: *** No rule to make target `clean'.  Stop.
make[1]: Leaving directory `/home/linuxmce/vdrlcdproc'
make: [clean-patched] Error 2 (ignored)
rm -f libvdr-*.so.*
dh_clean
dpatch  deapply-all
93_vdr-1.3.38 not applied to ./ .
92_lcdproc-1.3.18 not applied to ./ .
90_APIVERSION not applied to ./ .
02_connecterror not applied to ./ .
01_Makefile-fPIC-fix not applied to ./ .
rm -rf patch-stamp patch-stampT debian/patched
 dpkg-source -b vdrlcdproc
dpkg-source: warning: source directory './vdrlcdproc' is not <sourcepackage>-<upstreamversion> 'vdr-plugin-lcdproc-0.0.10'
dpkg-source: warning: .orig directory name vdrlcdproc.orig is not <package>-<upstreamversion> (wanted vdr-plugin-lcdproc-0.0.10.orig)
dpkg-source: building vdr-plugin-lcdproc using existing vdr-plugin-lcdproc_0.0.10.orig.tar.gz
dpkg-source: building vdr-plugin-lcdproc in vdr-plugin-lcdproc_0.0.10-30ubuntu3.diff.gz
dpkg-source: warning: executable mode 0755 of 'debian/patches/93_vdr-1.3.38.dpatch' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'debian/patches/02_connecterror.dpatch' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'debian/patches/92_lcdproc-1.3.18.dpatch' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'debian/patches/90_APIVERSION.dpatch' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'debian/patches/01_Makefile-fPIC-fix.dpatch' will not be represented in diff
dpkg-source: warning: ignoring deletion of file sockets.h
dpkg-source: warning: ignoring deletion of file setup.h
dpkg-source: warning: ignoring deletion of file HISTORY
dpkg-source: warning: ignoring deletion of file lcd.c
dpkg-source: warning: ignoring deletion of file i18n.h
dpkg-source: warning: ignoring deletion of file COPYING
dpkg-source: warning: ignoring deletion of file lcdtranstbl.h
dpkg-source: warning: ignoring deletion of file sockets.c
dpkg-source: warning: ignoring deletion of file README
dpkg-source: warning: ignoring deletion of file i18n.c
dpkg-source: warning: ignoring deletion of file lcd.h
dpkg-source: warning: ignoring deletion of file lcdkeyconf.h
dpkg-source: warning: ignoring deletion of file setup.c
dpkg-source: warning: ignoring deletion of file Makefile
dpkg-source: warning: ignoring deletion of file lcdproc.c
dpkg-source: building vdr-plugin-lcdproc in vdr-plugin-lcdproc_0.0.10-30ubuntu3.dsc
 debian/rules build
/usr/share/vdr-dev/make-special-vdr.sh debian/rules build SPECIAL_VDR_SUFFIX='' MAKE_SPECIAL_VDR='' NO_CHECKBUILDDEPS=''
test -d debian/patched || install -d debian/patched
dpatch  apply-all
applying patch 01_Makefile-fPIC-fix to ./ ... failed.
make: *** [patch-stamp] Error 1
linuxmce@dcerouter:~/vdrlcdproc$
« Last Edit: July 03, 2008, 12:32:37 am by colinjones »

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: VDR integration - How to add plugins
« Reply #21 on: July 03, 2008, 03:20:29 am »
OK, so I think I have tidied up the mess of folders and stuff I made, and started from scratch in the /tmp folder. This time I got it to go further, and it seems to have finished, with only a few warnings:

Code: [Select]
linuxmce@dcerouter:/tmp/lcdproc-0.0.10$ dpkg-buildpackage -rfakeroot
dpkg-buildpackage: source package is vdr-plugin-lcdproc
dpkg-buildpackage: source version is 0.0.10-30ubuntu3
dpkg-buildpackage: source changed by Timo Aaltonen <tepsipakki@ubuntu.com>
dpkg-buildpackage: host architecture i386
dpkg-buildpackage: source version without epoch 0.0.10-30ubuntu3
 fakeroot debian/rules clean
/usr/share/vdr-dev/make-special-vdr.sh debian/rules clean SPECIAL_VDR_SUFFIX='' MAKE_SPECIAL_VDR='' NO_CHECKBUILDDEPS=''
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
/usr/bin/make -o .dependencies clean DVBDIR=/usr VDRDIR=/usr/include/vdr LIBDIR=.
make[1]: Entering directory `/tmp/lcdproc-0.0.10'
make[1]: Leaving directory `/tmp/lcdproc-0.0.10'
rm -f libvdr-*.so.*
dh_clean
dpatch  deapply-all
93_vdr-1.3.38 not applied to ./ .
92_lcdproc-1.3.18 not applied to ./ .
90_APIVERSION not applied to ./ .
02_connecterror not applied to ./ .
01_Makefile-fPIC-fix not applied to ./ .
rm -rf patch-stamp patch-stampT debian/patched
 dpkg-source -b lcdproc-0.0.10
dpkg-source: warning: source directory './lcdproc-0.0.10' is not <sourcepackage>-<upstreamversion> 'vdr-plugin-lcdproc-0.0.10'
dpkg-source: warning: .orig directory name lcdproc-0.0.10.orig is not <package>-<upstreamversion> (wanted vdr-plugin-lcdproc-0.0.10.orig)
dpkg-source: building vdr-plugin-lcdproc using existing vdr-plugin-lcdproc_0.0.10.orig.tar.gz
dpkg-source: building vdr-plugin-lcdproc in vdr-plugin-lcdproc_0.0.10-30ubuntu3.diff.gz
dpkg-source: warning: executable mode 0755 of 'debian/patches/93_vdr-1.3.38.dpatch' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'debian/patches/02_connecterror.dpatch' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'debian/patches/92_lcdproc-1.3.18.dpatch' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'debian/patches/90_APIVERSION.dpatch' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'debian/patches/01_Makefile-fPIC-fix.dpatch' will not be represented in diff
dpkg-source: building vdr-plugin-lcdproc in vdr-plugin-lcdproc_0.0.10-30ubuntu3.dsc
 debian/rules build
/usr/share/vdr-dev/make-special-vdr.sh debian/rules build SPECIAL_VDR_SUFFIX='' MAKE_SPECIAL_VDR='' NO_CHECKBUILDDEPS=''
test -d debian/patched || install -d debian/patched
dpatch  apply-all
applying patch 01_Makefile-fPIC-fix to ./ ... ok.
applying patch 02_connecterror to ./ ... ok.
applying patch 90_APIVERSION to ./ ... ok.
applying patch 92_lcdproc-1.3.18 to ./ ... ok.
applying patch 93_vdr-1.3.38 to ./ ... ok.
dpatch  cat-all  >>patch-stampT
mv -f patch-stampT patch-stamp
dh_testdir
touch configure-stamp
dh_testdir
/usr/bin/make all DVBDIR=/usr VDRDIR=/usr/include/vdr LIBDIR=.
make[1]: Entering directory `/tmp/lcdproc-0.0.10'
make[1]: Leaving directory `/tmp/lcdproc-0.0.10'
make[1]: Entering directory `/tmp/lcdproc-0.0.10'
g++ -fPIC -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"lcdproc"' -I/usr/include/vdr/include -I/usr/include lcdproc.c
g++ -fPIC -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"lcdproc"' -I/usr/include/vdr/include -I/usr/include lcd.c
g++ -fPIC -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"lcdproc"' -I/usr/include/vdr/include -I/usr/include sockets.c
g++ -fPIC -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"lcdproc"' -I/usr/include/vdr/include -I/usr/include i18n.c
g++ -fPIC -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"lcdproc"' -I/usr/include/vdr/include -I/usr/include setup.c
g++ -fPIC -g -O2 -Wall -Woverloaded-virtual -shared lcdproc.o lcd.o sockets.o i18n.o setup.o -o libvdr-lcdproc.so
make[1]: Leaving directory `/tmp/lcdproc-0.0.10'
touch build-stamp
 fakeroot debian/rules binary
/usr/share/vdr-dev/make-special-vdr.sh debian/rules binary SPECIAL_VDR_SUFFIX='' MAKE_SPECIAL_VDR='' NO_CHECKBUILDDEPS=''
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
dh_install
dh_testdir
dh_testroot
dh_installdocs
dh_installexamples
dh_installchangelogs HISTORY
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
sh /usr/share/vdr-dev/patchlevel.sh subst
sh /usr/share/vdr-dev/dependencies.sh
dh_gencontrol
dh_md5sums
dh_builddeb
warning, `debian/vdr-plugin-lcdproc/DEBIAN/control' contains user-defined field `Original-Maintainer'
warning, `debian/vdr-plugin-lcdproc/DEBIAN/control' contains user-defined field `Vdr-Patchlevel'
dpkg-deb: building package `vdr-plugin-lcdproc' in `../vdr-plugin-lcdproc_0.0.10-30ubuntu3_i386.deb'.
dpkg-deb: ignoring 2 warnings about the control file(s)
 dpkg-genchanges
dpkg-genchanges: warning: unknown information field 'Xb-Vdr-Patchlevel' in input data in package's section of control info file
dpkg-genchanges: not including original source code in upload
dpkg-buildpackage: binary and diff upload (original source NOT included)
linuxmce@dcerouter:/tmp/lcdproc-0.0.10$

But after restarting VDR I can no longer get TV at all. It just crashes, like you said. So I looked in my order.conf file, and all that is in there is:

Code: [Select]
# If you like a fixed plugin order in your menu place the plugin base names
# here. Remember that the first entry a plugin may get, starts at five in
# VDR's OSD.
#
# If you want a certain Plugin not to be loaded automatically at
# vdr-startup, then you can simply write "-pluginname" in this file.
#
# If you want to add commandline-options for a certain plugin, this file is
# not the right place - you can add them in the file(s)
# /etc/vdr/plugins/plugin.<pluginname>.conf - each option in one line

firstplugin
secondplugin
-thirdplugin
-fourthplugin

That doesn't look right, it doesn't even mention xineliboutput....

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: VDR integration - How to add plugins
« Reply #22 on: July 03, 2008, 04:14:58 am »
Sorry to keep posting - but I broke TV, and I'm in trouble :)

I rebooted LMCE and it seems TV is back again, although I don't know why. I edited the order.conf file and added xineliboutput and -lcdproc, restarted VDR (/etc/init.d/vdr stop then start) no difference, and when it starts it only mentions xineliboutput as a plugin (as before) even though xineliboutput wasn't even in the order.conf file originally. Removed the "-" sign and tried again, with the same results.

So TV is working again, but I cannot find any evidence that the lcdproc plugin is even there. I did a sudo find / -name vdr* | grep lcd and there are no files or directories at all that match.

Further back you said, "As result you should get vdr-plugin-lcdproc package. After installation of that plugin you should modify /etc/vdr/plugins/order.conf to put it on the bottom. Here is my order.conf:"

Do you mean building the plugin (ie dpkg-buildpackage...) is one step, but then there is another step to actually "install" the plugin? Of course now I have rebooted, all the stuff in the /tmp directory is gone .... so I'm assuming that I was supposed to copy some files out of it into another folder (a vdr folder somewhere).... is that right?

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR integration - How to add plugins
« Reply #23 on: July 03, 2008, 08:19:11 am »
Colin,

It's better to do all work in the your home directory - /home/linuxmce. Just create a directory there to build plugins and other software.

Regarding the package. Sure, there are two steps: 1 - build plugin's package, 2 - install plugin's package. As I understand correctly you made the package. So, after that you should install it:
Code: [Select]
sudo dpkg -i <path_to_your_package>After that as I already mentioned you should modify your /etc/vdr/plugins/order.conf to load xineliboutput plugin first. You posted just default file with examples how to enable/disable plugins using order.conf. Just put there that code:
Code: [Select]
xineliboutput
control
lcdproc
If you have some other plugins add them before lcdproc. That plugin should be the last! Then restart vdr:
Code: [Select]
sudo /etc/init.d/vdr restartand see its log:
Code: [Select]
sudo tail -f /var/log/syslog
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: VDR integration - How to add plugins
« Reply #24 on: July 04, 2008, 12:23:21 am »
Michael - great, thanks! One last question before I go ahead ... from memory what I ended up with was a directory with a whole load of files in it (mostly the source files I originally downloaded I think). When you say <pathtoyourpackage> what type of file will it be? A .deb?

It'll be a while before you get up, so I will start the process again, and see if I can find a deb or something else that is obvious, in the meantime!
Thanks again...

Col.

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR integration - How to add plugins
« Reply #25 on: July 04, 2008, 08:10:00 am »
Yes, pathtoyourpackage is a path to the built deb package. If you built it in the directory /tmp/lcdproc-0.0.10 the package should be in the one level higher - in the /tmp.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: VDR integration - How to add plugins
« Reply #26 on: July 05, 2008, 02:18:09 am »
Woo hoo! Got it working - thanks for your help!

Quick related question - I have configured lcdproc (client) as well to display a couple of system screens (CPU/Memory/etc) - I can run it from the command line, but obviously this doesn't survive reboots. I know there are numerous ways to run things at startup (cron, scripts, etc) but I have no idea which is the best for this type of thing - where and how would you suggest I run lcdproc from during startup?

Col
« Last Edit: July 05, 2008, 02:23:45 am by colinjones »

gnaffs

  • Regular Poster
  • **
  • Posts: 16
    • View Profile
Re: VDR integration - How to add plugins
« Reply #27 on: February 08, 2010, 08:56:27 pm »
Hi,

I have tried to complie a plugin to vdr v. 1.7.11. After updating the Make.config with the path to the v4l files i got rid of the: usr/include/vdr/dvbdevice.h:19:2: error: #error VDR requires Linux DVB driver API version 5.0 or higher!

But when i tried to load the plugin I  got an error about binary incompabiltiy. Can someone point me in right direction.

Brgrds Krister


nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR integration - How to add plugins
« Reply #28 on: February 08, 2010, 10:48:18 pm »
Have the same problem. Didn't find the solution yet.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2847
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: VDR integration - How to add plugins
« Reply #29 on: February 09, 2010, 12:16:29 am »
A couple of notes:
  • Make sure you have S2lipliannin package installed
  • All our plugins are based on source packages from eTobi with PATCHVARIANT=multipatch

If you have specific plugins you think are helpful for other people as well, feel free to open a feature request in trac. If the plugin in question has source packages available on etobi, chances are good that we will incorporate the package into our repo.