File appimage.yml.md of Package build-pkg2appimage
Official upstream documentation for the supported yml file is here:
https://github.com/probonopd/AppImages/blob/master/YML.md
### OBS and build script extensions are
OBS needs to prepare the build, meaning getting all required resource before
being able to initiate it. This is needed to track changes and therefore
to find out if a rebuild is needed. Also to provide the resource in a secured
and reproducable environment without network access.
The build: section can be used to define resources which are required to build.
This can be binary packages (eg rpm, arch or deb files) or URLs to any other
SCM or file.
The binary packages listed in the build section get installed to the build
environment, but not extracted into the appimage root.
The packges listed in the ingrediant sections get not installed into the
build environment (FIXME: not yet true), but get extracted in the appimage root.
URLs for a supported scm (git, svn, cvs, hg, bzr) get handled via the appimage
source service, part of obs-service-tar_scm. It is downloading the sources
and provides them to the build system as directory structure.
(FIXME: not yet implemented) URLs to files get handled via the download_files
source service. It is handy to provide single files to the build.
Scripts can be executed in the form of a "Recipe" file or using the script
hooks of the appimage.yml file.
Please note: It is optional to either
* Create the appimage root via packages by using the ingrediants section.
This is esp. useful for larger software, because it avoid the need of a
recompilation and just repackages the content of binary packages.
* Create the appimage root only from source using the scripts
This is useful when you want to avoid to build a binary package first.
But both approaches can also get combined if wanted.
=== Example appimage.yml file.
Please note that it uses the following environement variables which are provided
in the build system:
BUILD_SOURCE_DIR: The absolute directory name where all source files or directories are hosted
BUILD_APPDIR: The directory which will get packaged as AppImage file
=== Most simple example
This APPIMAGE_NAME application will get package into an .AppImage file just
by installing the RPM_PACKAGE_NAME . The binary can get patched automatically
when using the binpatch option
app: APPIMAGE_NAME
# binpatch: true
ingredients:
packages:
- RPM_PACKAGE_NAME
=== Simple example building from source
app: QtQuickApp
build:
packages:
- linuxdeployqt
- pkgconfig(Qt5Quick)
git:
- https://github.com/probonopd/QtQuickApp.git
script:
- cd $BUILD_SOURCE_DIR/QtQuickApp*
- qmake-qt5 PREFIX=/usr
- make INSTALL_ROOT=$BUILD_APPDIR install
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
- linuxdeployqt $BUILD_APPDIR/usr/share/applications/*.desktop -bundle-non-qt-libs -verbose=3
- find $BUILD_APPDIR -executable -type f -exec ldd {} \; | grep ' => /usr' | cut -d ' ' -f 2-3 | sort | uniq
=== Options inside of the build section
Note: you can add multiple items in the sections.
build:
packages:
- [SINGLE BINARY PACKAGE NAME]
git: # can be also svn, cvs, hg, bzr
- [URL TO SCM REPOSITORY]
files:
- [URL TO A RESOURCE]