Create .spk from .deb

This forum is for devlopers to discuss questions about apps/plug-ins/extension modules/API specifically developed for using with Synology DiskStations.
Tatou
I'm New!
I'm New!
Posts: 2
Joined: Tue Feb 28, 2017 2:44 pm

Create .spk from .deb

Postby Tatou » Tue Feb 28, 2017 3:03 pm

Hi,

I'm a student in computer science and i'm doing an internship.
The company asked me to "convert" a .deb package to a .spk package.
They want to be able to install the package very easily on a Synology nas.
Is this possible ? If it's possible where can i start ? I found this : https://developer.synology.com/download/developer-guide.pdf but i don't understand what i have to do with it.

Thanks,
User avatar
rednoah
Apprentice
Apprentice
Posts: 83
Joined: Wed Nov 07, 2012 7:16 am
Location: Taiwan
Contact:

Re: Create .spk from .deb

Postby rednoah » Tue Feb 28, 2017 7:29 pm

My ant-spk tool allows you to easily build SPK packages on all platforms:
https://forum.synology.com/enu/viewtopi ... 3&t=100706

If your deb is merely installing files, then converting it to an SPK package shouldn't be too much work.

1. Extract files from deb
2. Look at deb metadata and create ant-spk build task from that
3. Use ant-spk to build a spk package

:!: If your deb is running install/uninstall scripts, then you'll probably need to port those scripts, which is a task that cannot be automated and will range from very easy (e.g. create link in /usr/local/bin) to impossible (e.g. run some Debian-specific commands that don't exist on DSM).
Tatou
I'm New!
I'm New!
Posts: 2
Joined: Tue Feb 28, 2017 2:44 pm

Re: Create .spk from .deb

Postby Tatou » Mon Mar 06, 2017 9:18 am

Hi,

Thanks for your answer, by .deb metadata to which files do you refer ?
You said that the complexity can be easily to impossible. My package copies files to specific folder and run a daemon in background.
In which category is he ?
User avatar
rednoah
Apprentice
Apprentice
Posts: 83
Joined: Wed Nov 07, 2012 7:16 am
Location: Taiwan
Contact:

Re: Create .spk from .deb

Postby rednoah » Mon Mar 20, 2017 11:45 am

Tatou wrote:by .deb metadata to which files do you refer ?

Anything that's in the control file (e.g. preinst, postrm, etc) is something you'll have to port in a way that makes sense on DSM:
https://en.wikipedia.org/wiki/Deb_(file_format)#Control_archive

Tatou wrote:copies files to specific folder

Easy.

Tatou wrote:run a daemon in background

Depends. Things like initctl work with DSM6 or higher, so it's doable.

Return to “Developer Discussion Room”

Who is online

Users browsing this forum: No registered users and 2 guests