Author Topic: VDR Plugins How-to?  (Read 5201 times)

gazlang

  • Guru
  • ****
  • Posts: 210
    • View Profile
VDR Plugins How-to?
« on: May 27, 2008, 12:11:51 pm »
Hi,

I want to get some plugins for VDR running on x64 LMCE, one of which is the lcdproc plugin. I am not 100% on what I should do to compile plugins in LMCE.

I have read this how-to http://smart-home-blog.com/writes/configure-imon-padvfd-in-plutohome but don't really understand what the VDR sources are, where the "<your_vdr_src_dir>/PLUGINS/src" is, or whether I need to patch the plugin sources as well.

I also notice that the link for the x64 pre-built deb package is no longer available, so can't do it the easy way :-)

I would be greatful if someone could give me a comprehensive step by step on this.

Cheers
AMD Athlon 5800+ X2
Asus M2N-SLI-Deluxe
2x Corsair XMS6400 DDR2 512mb
Samsung 400GB SATA + 500GB SATA
nVidia GeForce 7300GT
Hauppauge Nova-T 500
Hauppauge PVR-500
Thermaltake low-noise 450w PSU
Thermaltake Bach Case w/ imon vfd
Fiire Remote
UIRT

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR Plugins How-to?
« Reply #1 on: May 28, 2008, 03:43:48 pm »
gazlang, when I built LCD VDR plugin I just downloaded VDR 1.4.7, installed VDR headers from LinuxMCE and used them to compile the plugin. I'll fix the link tonight. So, you'll be able to download plugin's package. But note that for the latest LinuxMCE version you should use VDR 1.6.0 not 1.4.7.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

gazlang

  • Guru
  • ****
  • Posts: 210
    • View Profile
Re: VDR Plugins How-to?
« Reply #2 on: May 28, 2008, 04:11:40 pm »
Cheers niteman.


I assume VDR headers is vdr-dev, but how do I use this to build a plugin??
And also, I assume I just download VDR 1.6.0 and NOT attempt to make / install, but just extract it and put the plugin into the PLUGIN folder and run make plugins?

If I just download and run the .deb package (if you fix it) do I need to Download VDR and headers?

--Obviosly completely new to VDR and plugins :) --
AMD Athlon 5800+ X2
Asus M2N-SLI-Deluxe
2x Corsair XMS6400 DDR2 512mb
Samsung 400GB SATA + 500GB SATA
nVidia GeForce 7300GT
Hauppauge Nova-T 500
Hauppauge PVR-500
Thermaltake low-noise 450w PSU
Thermaltake Bach Case w/ imon vfd
Fiire Remote
UIRT

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR Plugins How-to?
« Reply #3 on: May 29, 2008, 08:31:24 am »
Well, I refreshed my memory a bit and found the way how I built plug-ins. I installed vdr-dev contained patched headers from LinuxMCE. Then I downloaded from Ubuntu repository sources of desired plug-in (vdr-lcdproc, in my case). Unpacked them and built deb package using
Code: [Select]
dpkg-buildpackage -rfakeroot. That's it.

I prefer to use deb package because it'll be much easily to install it on others PC.

Hope it helped you.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

gazlang

  • Guru
  • ****
  • Posts: 210
    • View Profile
Re: VDR Plugins How-to?
« Reply #4 on: May 29, 2008, 12:10:11 pm »
So do I just:

Code: [Select]
sudo apt-get install vdr-dev
Then download and untar the vdr-lcdproc-plugin

enter the vdr-lcdproc-plugin directory and run

Code: [Select]
dpkg-buildpackage -rfakeroot

AMD Athlon 5800+ X2
Asus M2N-SLI-Deluxe
2x Corsair XMS6400 DDR2 512mb
Samsung 400GB SATA + 500GB SATA
nVidia GeForce 7300GT
Hauppauge Nova-T 500
Hauppauge PVR-500
Thermaltake low-noise 450w PSU
Thermaltake Bach Case w/ imon vfd
Fiire Remote
UIRT

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR Plugins How-to?
« Reply #5 on: May 29, 2008, 02:39:05 pm »
Before run dpkg-buildpackage -rfakeroot you should apply ubuntu patch - <some_package_name.diff>. It can be found in the source section:

Code: [Select]
patch -p1 < ../vdr-plugin-<plugin_name>.diff
Note: you should be in the plugin directory. After applying the patch the new directory will be created there - debian. It contains package definitions. Also you should change node of file debian/rules to make it executable.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

gazlang

  • Guru
  • ****
  • Posts: 210
    • View Profile
Re: VDR Plugins How-to?
« Reply #6 on: May 29, 2008, 11:44:40 pm »
Cheers,

I got as far as building the package, but it failed on a dependency - which I guess is lcdproc (even though I have lcdproc installed from source)

I guess it is lcdproc as I downloaded a pre-built lcdproc-plugin.deb from ubuntu and that too required installation of lcdproc. After installing the .deb successfully (and adding another lcdproc) I restarted vdr and had the message:
Quote
WARNING: The following plugins have been left out due to possible binary incompatibility: lcdproc.
I uninstalled the plugin and tried installing it following these instructions:
Quote
Download and untar somewhere appropriate version of VDR sources (1.4.7 in case of LinuxMCE)
Download the latest version of vdr-lcdproc plug-in
Untar it into <your_vdr_src_dir>/PLUGINS/src and make a symlink - ln -s lcdproc-0.0.10-jw2 lcdproc
Build plug-in: make plugins. Note, for AMD64 you should add option -fPIC to the CXXFLAGS into lcdproc Makefile. Otherwise you’ll get this error:
 /usr/bin/ld: lcdproc.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
 lcdproc.o: could not read symbols: Bad value
Copy <your_vdr_src_dir>/PLUGINS/lib/libvdr-lcdproc.so.1.4.5 to the /usr/lib/vdr/plugins
Add a new config file plugin.lcdproc.conf into /etc/vdr/plugins and put there following options:
 -h 127.0.0.1
 -p 13666

restarted vdr, and get the same message - lcdproc plugin left out!

Any ideas?
AMD Athlon 5800+ X2
Asus M2N-SLI-Deluxe
2x Corsair XMS6400 DDR2 512mb
Samsung 400GB SATA + 500GB SATA
nVidia GeForce 7300GT
Hauppauge Nova-T 500
Hauppauge PVR-500
Thermaltake low-noise 450w PSU
Thermaltake Bach Case w/ imon vfd
Fiire Remote
UIRT

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: VDR Plugins How-to?
« Reply #7 on: May 30, 2008, 09:00:31 am »
Ok, let's start from the beginning:
1. Download vdr-plugin-lcdproc from the Ubuntu site - http://tinyurl.com/5qngff. Actually it's sources from hardy but I think it should be ok for gutsy as well.
2. Download Ubuntu patch - http://tinyurl.com/3khrdk.
3. Install vdr-dev from LinuxMCE - apt-get install vdr-dev.
4. Untar vdr-plugin-lcdproc somewhere.
5. Goto vdr-plugin-lcdproc directory.
6. Unzip Ubuntu patch somewhere.
7. Apply Ubuntu patch to the vdr-plugin-lcdproc: patch -p1 < path_to_ubuntu_patch_file. Note: you should be inside vdr-plugin-lcdproc directory.
8. Find and replace hardy by gutsy in the created by patch directory debian.
9. Change mode of file debian/rules - chmod +x debian/rules.
10. Build your package - dpkg-buildpackage -rfakeroot. If you'll get that error - Note, for AMD64 you should add option -fPIC to the CXXFLAGS into lcdproc Makefile ... just add option -fPIC to theCXXFLAGS in the  Makefile and run dpkg-buildpackage -rfakeroot again.
11. As result you should get an Ubuntu package and its service files outside vdr-plugin-lcdproc directory.
12. Install built package and restart vdr.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

gazlang

  • Guru
  • ****
  • Posts: 210
    • View Profile
Re: VDR Plugins How-to?
« Reply #8 on: May 30, 2008, 07:01:17 pm »
Cheers nite_man, worked like a charm.
Adding the -fPIC option to the makefile results in an error as the deb adds a patch to change this (and fails if it has already changed).
I also removed the lcdproc dependancy from /debian/control before running dpkg... (don't know why it can't detect my lcd-proc!)

Anyway, thanks again
AMD Athlon 5800+ X2
Asus M2N-SLI-Deluxe
2x Corsair XMS6400 DDR2 512mb
Samsung 400GB SATA + 500GB SATA
nVidia GeForce 7300GT
Hauppauge Nova-T 500
Hauppauge PVR-500
Thermaltake low-noise 450w PSU
Thermaltake Bach Case w/ imon vfd
Fiire Remote
UIRT