SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.02k stars 1.23k forks source link

Oscam SPK #159

Closed schumi2004 closed 12 years ago

schumi2004 commented 12 years ago

Request to have Oscam packaged into spk.

Seems a bit more complicated then TVHeadend, to identify card-readers we need libusb support (list_smargo)

With SSH you then can find your device ID from cardreader, don't know if it is possible to get this in a GUI?

Source: https://github.com/gfto/oscam

@Diaoul How can i disable ./configure in spksrc?

Setting GNU_CONFIGURE to 0 didn't worked as described in spksrc.configure.mk

Maybe it's useful, configuration files needed for OSCam https://www.dropbox.com/s/5931we3djix3cdo/OSCAM%20PACKAGE%20%20CONFIG%20FILES.txt

Edit2: What i have so far https://github.com/schumi2004/spksrc/tree/oscam/

Diaoul commented 12 years ago

CONFIGURE_TARGET = nope

schumi2004 commented 12 years ago

That seems to do the trick, now i need to solve latest error and then i can start with SPK section

11:31:36 {oscam} ~/schumi2004/cross/oscam$ make arch-88f6281 ===> Building package for arch 88f6281 make[1]: Entering directory /home/openelec/schumi2004/cross/oscam' ===> Installing for oscam find /home/openelec/schumi2004/cross/oscam/work-88f6281/install//usr/local/ \! -type d -printf '%P\n' | sort > /home/openelec/schumi2004/cross/oscam/work-88f6281/oscam.plist.tmp cd /home/openelec/schumi2004/cross/oscam/work-88f6281/gfto-oscam-* && env PKG_CONFIG_LIBDIR=/home/openelec/schumi2004/cross/oscam/work-88f6281/install//usr/local/lib/pkgconfig WORK_DIR=/home/openelec/schumi2004/cross/oscam/work-88f6281 INSTALL_PREFIX=/usr/local TC=syno-88f6281 LD=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld CPP=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-cpp NM=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-nm CC=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc AS=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-as RANLIB=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ranlib CXX=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-g++ AR=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ar STRIP=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-strip OBJDUMP=/home/openelec/schumi2004/toolchains/syno-88f6281/work/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-objdump CFLAGS=" -I/home/openelec/schumi2004/cross/oscam/work-88f6281/install//usr/local/include " CPPFLAGS="-I/home/openelec/schumi2004/cross/oscam/work-88f6281/install//usr/local/include " LDFLAGS=" -L/home/openelec/schumi2004/cross/oscam/work-88f6281/install//usr/local/lib -Wl,--rpath-link,/home/openelec/schumi2004/cross/oscam/work-88f6281/install//usr/local/lib -Wl,--rpath,/usr/local/lib " make install DESTDIR=/home/openelec/schumi2004/cross/oscam/work-88f6281/install make[2]: Entering directory/home/openelec/schumi2004/cross/oscam/work-88f6281/gfto-oscam-9f38e78' make[2]: * No rule to make target install'. Stop. make[2]: Leaving directory/home/openelec/schumi2004/cross/oscam/work-88f6281/gfto-oscam-9f38e78' make[1]: * [myInstall] Error 2 make[1]: Leaving directory `/home/openelec/schumi2004/cross/oscam' make: *\ [arch-88f6281] Error 2 11:31:38 {oscam} ~/schumi2004/cross/oscam$

Edit: I think it's solved

ake[2]: Leaving directory /home/openelec/schumi2004/cross/oscam/work-88f6281/gfto-oscam-9f38e78' ===> Installing for oscam find /home/openelec/schumi2004/cross/oscam/work-88f6281/install//usr/local/ \! -type d -printf '%P\n' | sort > /home/openelec/schumi2004/cross/oscam/work-88f6281/oscam.plist.tmp find /home/openelec/schumi2004/cross/oscam/work-88f6281/install//usr/local/ \! -type d -printf '%P\n' | sort | \ diff /home/openelec/schumi2004/cross/oscam/work-88f6281/oscam.plist.tmp - | grep '>' | cut -d' ' -f2- > /home/openelec/schumi2004/cross/oscam/work-88f6281/oscam.plist make[1]: Leaving directory/home/openelec/schumi2004/cross/oscam' 11:33:29 {oscam} ~/schumi2004/cross/oscam$

Diaoul commented 12 years ago

INSTALL_TARGET = nope

schumi2004 commented 12 years ago

Ok, it compiled fine to a package. (oscam-88f6281-adeb991-1.spk) I think the only thing left is to fine tune the needed config files.

Edit: Again (same as with tvheadend) the binary isn' in the package :(

schumi2004 commented 12 years ago

@Diaoul How can i append -libusb to the make command like mentioned here? http://www.oscam.to/wbb3/index.php?page=Thread&postID=12385#post12385

I tried using myInstall as install target and changing the make command but $ARCH isn't the correct variable i guess

Thanks in advance.

Diaoul commented 12 years ago

Fixed in a56dc397511ec6360770ece556ccce77653dd6aa

Why is libusb needed here? I could compile without it

schumi2004 commented 12 years ago

You could indeed compile without it but some users need it to determine on which device your cardreader is connected, so you could enter this in configuration. When libusb is compiled within oscam you'll get a program called list_smargo (or something like that)

That program will give this output

unplug smargo plug smargo to syno from syno-telnet do this command ./list_smargo and you can see something like this

Looking for smartreader with an out endpoint = 0x82 : bus 001, device 003 : 0403:6001 Smartreader (Device=001:003 EndPoint=0x82 insert in oscam.server 'Device = Serial:Reader 117') Note: Remember bus, device ID!!! Change this in oscam.server!!!!

Get it ?

Diaoul commented 12 years ago

So this is a helper for users? I think you can get those information from /proc after having plugged the USB

schumi2004 commented 12 years ago

It's a sort of helper yes. I couldn't retrieve info with /proc for my cardreader, list_smargo did it for me.

Like name says it's mainly for Smargo Cardreaders

jjLDN commented 12 years ago

Today I have spotted OSCam SPK in Package Center. How to use it?

schumi2004 commented 12 years ago

Do you need card reader for provider, if yes then you need it.

More info on howto configure it http://oscam.to

schumi2004 commented 12 years ago

I don't have Oscam fully functional, when adding reader it's missing LIBUS. I'll try to add Libusb and see how goes.

http://i.imgbox.com/adpQ3EYz.png

jjLDN commented 12 years ago

The reason I asked how to use it is that I cannot communicate with any sort of webgui on port 83 even though I have opened that port. On the attached picture I can see kind of webgui which doesn't appear for me. Does the OSCam package work only if supported smartcard reader is discovered or is that another Intel based DS issue?

schumi2004 commented 12 years ago

It should work immediately on port 83. How are you trying to connect to it, from local network or from outside your network?

jjLDN commented 12 years ago

local network like: 192.168.X.X:83

jjLDN commented 12 years ago

Does this apk come with libusb?

schumi2004 commented 12 years ago

nope , maybe diaoul can fix this?

Diaoul commented 12 years ago

Anyway, you should see something on port 83. Check the log file in /usr/local/oscam/var/oscam.log and see any message related to the HTTP server

schumi2004 commented 12 years ago

@Diaoul any change you can package OSCam with libusb, can't seem to get it working for me.

Diaoul commented 12 years ago

Oscam is going to be removed from SynoCommunity's repository for legal reasons (not spksrc). As for libusb, I'll give it a shot.

schumi2004 commented 12 years ago

Fair enough. Thanks for trying it.