Skip to content

jimsth/twonkyserver-apkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Twonky Server package

Prerequisite

  • The development of the script was done on an Ubuntu [2] 12.04 32-bit.
  • Working Python environment - on Ubuntu 12.04 it was 2.7.3

Run script

run bin/apkg-create-package.sh --help to see how to invoke the script.

Example: sudo bin/apkg-create-package.sh i386. That will create the Twonky Server package for the i386 based ASUSTOR NAS, like AS-20xT/TE and AS-30xT. The *.apk file will be copied to the current directory and has date/time added to it's name to prevent overwritting existing files.

The source directory contains all files needed for Twonkyserver's APKG to run on i386 or x86_64 based ASUSTOR NAS'. Except the Twonkyserver files itself. You can download the currently lastest version 7.2.6 on the Twonkyserver NAS Download page, 32-bit or 64-bit. Unzip the content into the source/twonkyserver-i386 or source/twonkyserver-x86-64 directory directly and run the bin/apkg-create-package.sh script.

What the script does

  1. The script first looks for the file twonkystarter in source/twonkyserver-{arch} to see if the Twonkyserver files are present.
  2. Then copies over the architecture dependent Twonky Server files and adds common twonkyserver/cgi-bin/*.{desc,location} files[1] to the build directory.
  3. The Twonk Server provided convert executable in cgi-bin gets deleted - a recent version is provided by the NAS OS - and ttu moved to bin so all the executables can be found in the same directory.
  4. Sets ownership of the file in the build directory to admin:administrators (uid/gid 999)
  5. Runs the ASUSTOR provide packaging script bin/apkg-tools.py. The resulting package file is placed in the current directory and the naming consists of the date and time of creation.

[1]: The *.desc files were copied over from a Twonky Server installation on a QNAP NAS. "files"

Misc

  • The source/bin-{arch} and source/lib-{arch} folder contain the files needed to have the helper flac & ffmpeg run successfully.
  • Twonky runs as user admin
  • Package configuration file is source/CONTROL/config.json. If you modify the package then you want to change at least the fields maintainer, version and email
  • The package creates a shared folder named 'Media'. That's defined in config.json too.
  • The ASUSTOR packaging format is quite simple: the APKG file is a ZIP file holding three files : apk-version (= OS major version : 2.0), control.tgz (content of build/CONTROL folder) and data.tgz (the rest of the build directory)

The bin-{i386,x86-64} folders do contain the helper ffmpeg & flac. The ImageMagick helper convert is already provided by the NAS itself in /usr/builtin/bin

Links

About

Build Twonkyserver package for ASUSTOR NAS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published