Build Your Own QPKG
Last updated
Was this helpful?
Last updated
Was this helpful?
Generate environment for QPKG
Use SSH client to connect to your NAS
Issue below commands to create an environment of your own QPKG (assuming to-be-built QPKG name is “MyQPKG”)
# cd `getcfg QDK Install_Path -f /etc/config/qpkg.conf`
# qbuild --create-env MyQPKG
A folder named “MyQPKG” is then generated
[/share/HDA_DATA/.qpkg/QDK] # ls
MyQPKG/ bin/ qdk* scripts/ template/
[/share/HDA_DATA/.qpkg/QDK] # cd MyQPKG/
[/share/HDA
DATA/.qpkg/QDK/MyQPKG] # ls
arm_64
arm-x19 arm-x31/ arm-x41/ build/ icons/ qpkg.cfg x86/ config/ package_routines shared/ x86_64/ x86_ce53xx/
Configure QPKG
QPKG_NAME: Name of the QPKG
QPKG_VER: Version of the QPKG
QPKG_AUTHOR: Author of the QPKG
[/share/HDA_DATA/.qpkg/QDK/MyQPKG] # vi qpkg.cfg
# Name of the packaged application.
QPKG_NAME="MyQPKG"
# Version of the packaged application.
QPKG_VER="0.1"
# Author or maintainer of the package
QPKG_AUTHOR="admin"
Customize QPKG routines
Content of file “package_routines”
pkg_pre_install() : routines before install
pkg_install() : routines during install
pkg_post_install() : routines after install
PKG_PRE_REMOVE : routines before uninstall
PKG_MAIN_REMOVE : routines during uninstall
PKG_POST_REMOVE : routines after uninstall
Content of file “shared\/MyQPKG.sh"
Start : routines when starting the QPKG
Stop : routines when stoping the QPKG
Add files to QPKG
Put files in below folders for different purposes:
shared\/: Platform-independent files and folders
arm-x19\/ arm-x31\/ arm-x41(TS-x31+)\/ x86\/ x86_ce53xx\/ x86_64\/: Platform-dependent files and folders
icons\/: icon files
config\/: config files
Generate QPKG file
Use below command to build the QPKG file
[/share/CACHEDEV1_DATA/.qpkg/QDK/MyQPKG] # qbuild
Creating archive with data files...
Creating archive with control files...
Creating QPKG package...
The QPKG file will be generated in the build folder