How to make package?

Who doesn't love third-party apps? Get together and talk about them here.
grzenio
Posts: 34
youtube meble na wymiar Warszawa
Joined: Fri Jan 03, 2014 9:52 pm

How to make package?

Post by grzenio »

Hi.
I run with success serviio on my as-302T. How i make package ? and add run script to ini.d ? to autorun? and add deps for serviio?
NAS: AS-302T
Notebook: HP 8540w, i7, 16GB RAM, Elementary OS Luna
Mmedia: Serviio on ASUSTOR NAS & Samsung TV
Network: TP-LNIK TL-WR1043ND
Portable: Moto G
MrK
Posts: 127
Joined: Tue Nov 19, 2013 7:19 pm

Re: How to make package?

Post by MrK »

It's probably a bit boring to get another answer from me, but here I go:

You go to developer.asustor.com and register yourself and log in. Then you go to "Tools" and there you find all you need. A PDF that explains the package structure and the files needed + the Python script used to create the package (and the same toolchain as on sourceforge).

Personally I found it easier to look at an existing, installed application and go from there. Then I consulted the PDF for cases when I wasn't sure what something was used for.
Storage: AS-202T | AS-604T (borrowed)
PC/Laptop: iMac 27" & rMBP 15"
Media Server/Player: Plex on ASUSTOR NAS & Samsung TV
MrK
Posts: 127
Joined: Tue Nov 19, 2013 7:19 pm

Re: How to make package?

Post by MrK »

Do you need help with creating the package? I'd like to try Serviio :)
Storage: AS-202T | AS-604T (borrowed)
PC/Laptop: iMac 27" & rMBP 15"
Media Server/Player: Plex on ASUSTOR NAS & Samsung TV
grzenio
Posts: 34
Joined: Fri Jan 03, 2014 9:52 pm

Re: How to make package?

Post by grzenio »

yes i need.
python app from dev asustor dont like me :)
hm... i think we need create 2 package, one server and two with web gui.
and depends:
web gui need serviio and web server with php
serviio need jre
NAS: AS-302T
Notebook: HP 8540w, i7, 16GB RAM, Elementary OS Luna
Mmedia: Serviio on ASUSTOR NAS & Samsung TV
Network: TP-LNIK TL-WR1043ND
Portable: Moto G
MrK
Posts: 127
Joined: Tue Nov 19, 2013 7:19 pm

Re: How to make package?

Post by MrK »

Download the file here, install it on the NAS and have a look. If you copy the ASUSTOR python script to the NAS (/usr/local/bin) it should run just fine if the Python package is installed. And on Ubuntu it works too with Python 2.7.3.

After installing the package and the python script on the NAS you just go to /usr/local/AppCentral and run

Code: Select all

$ apkg-tools.py create serviio
or

Code: Select all

$ /usr/local/bin/apkg-tools.py create serviio
.

No need to have seperate packages for serviio and web gui. And the ASUSTOR app guide PDF shows how you can intergrate an web app into the ASUSTOR web server.

[add]It's just a draft, still running as root. I set them usually to 'admin'[/add]
Storage: AS-202T | AS-604T (borrowed)
PC/Laptop: iMac 27" & rMBP 15"
Media Server/Player: Plex on ASUSTOR NAS & Samsung TV
grzenio
Posts: 34
Joined: Fri Jan 03, 2014 9:52 pm

Re: How to make package?

Post by grzenio »

you add: "enable-service":["httpd", "mysql"],
but serviio no need mysql

and post inst is from amule :)
NAS: AS-302T
Notebook: HP 8540w, i7, 16GB RAM, Elementary OS Luna
Mmedia: Serviio on ASUSTOR NAS & Samsung TV
Network: TP-LNIK TL-WR1043ND
Portable: Moto G
MrK
Posts: 127
Joined: Tue Nov 19, 2013 7:19 pm

Re: How to make package?

Post by MrK »

Yep, I copied it over from the amule package I created :) and I wasn't sure if it uses mysql so I thought I leave in for the draft. You're of course welcome to adapt & clean it and submit it the the ASUSTOR developer page.
Storage: AS-202T | AS-604T (borrowed)
PC/Laptop: iMac 27" & rMBP 15"
Media Server/Player: Plex on ASUSTOR NAS & Samsung TV
grzenio
Posts: 34
Joined: Fri Jan 03, 2014 9:52 pm

Re: How to make package?

Post by grzenio »

ok. now serviio need ffmpeg, 2 ways.
or copy ffmpeg int bin directory from upnp server 2.0 from asustor and change serviio.sh script
or install ipkg and install ffmpeg from optware and change serviio.sh

Code: Select all

JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=/opt/bin/ffmpeg -Dfile.encoding=UTF-8"
NAS: AS-302T
Notebook: HP 8540w, i7, 16GB RAM, Elementary OS Luna
Mmedia: Serviio on ASUSTOR NAS & Samsung TV
Network: TP-LNIK TL-WR1043ND
Portable: Moto G
MrK
Posts: 127
Joined: Tue Nov 19, 2013 7:19 pm

Re: How to make package?

Post by MrK »

Yep, I read on their homepage that it needs ffmpeg but I don't want to intervene with the work you're doing. More specifically it needs ffmpeg compiled with libRTMP, libASS, libx264 and libmp3lame and the package dcraw. I would advise you to compile it yourself and include it in the package. You probably shouldn't depend on Optware or other packages since you can't know if other users have it installed.
Storage: AS-202T | AS-604T (borrowed)
PC/Laptop: iMac 27" & rMBP 15"
Media Server/Player: Plex on ASUSTOR NAS & Samsung TV
grzenio
Posts: 34
Joined: Fri Jan 03, 2014 9:52 pm

Re: How to make package?

Post by grzenio »

MrK wrote:Yep, I read on their homepage that it needs ffmpeg but I don't want to intervene with the work you're doing. More specifically it needs ffmpeg compiled with libRTMP, libASS, libx264 and libmp3lame and the package dcraw. I would advise you to compile it yourself and include it in the package. You probably shouldn't depend on Optware or other packages since you can't know if other users have it installed.
dcraw is in optware, i installed this.
ok. i try compile this depends, but i need few days. tomorrow i send to WD my WD RED disk to warranty.
NAS: AS-302T
Notebook: HP 8540w, i7, 16GB RAM, Elementary OS Luna
Mmedia: Serviio on ASUSTOR NAS & Samsung TV
Network: TP-LNIK TL-WR1043ND
Portable: Moto G
Post Reply

Return to “Developer's Corner”