2019-10-29 09:53:39 +01:00
|
|
|
#
|
|
|
|
# Building an AppImage for Valentina in openSuse Build Service (OBS)
|
|
|
|
#
|
|
|
|
# Unfortunately the C++ compiler in the appimage build service is stuck with C++11
|
|
|
|
#
|
|
|
|
|
|
|
|
app: valentina
|
|
|
|
# binpatch: true
|
|
|
|
|
|
|
|
# resources required at build time
|
|
|
|
build:
|
|
|
|
# packages which get installed in the build enviroment.
|
|
|
|
# These are NOT part of the resulting image.
|
|
|
|
packages:
|
|
|
|
- gcc-c++
|
|
|
|
- libqt5-qtbase-devel
|
|
|
|
- pkgconfig(Qt5Svg)
|
|
|
|
- pkgconfig(Qt5Core)
|
|
|
|
- pkgconfig(Qt5Gui)
|
|
|
|
- pkgconfig(Qt5Network)
|
|
|
|
- pkgconfig(Qt5PrintSupport)
|
|
|
|
- pkgconfig(Qt5Widgets)
|
|
|
|
- pkgconfig(Qt5Xml)
|
|
|
|
- pkgconfig(Qt5Concurrent)
|
|
|
|
- pkgconfig(Qt5XmlPatterns)
|
|
|
|
- pkgconfig(zlib)
|
|
|
|
- libQt5Core-devel
|
|
|
|
- libpng-devel
|
|
|
|
- libqt5-linguist-devel
|
2019-11-29 14:15:10 +01:00
|
|
|
- libicu-devel # to be able to fix the icu data path
|
2019-10-29 09:53:39 +01:00
|
|
|
- linuxdeployqt # required tooling, see script section
|
|
|
|
|
|
|
|
# resources which will become available as part of the source.
|
|
|
|
# The "appimage" source service needs to be enabled to process these.
|
2021-01-26 15:45:42 +01:00
|
|
|
# git:
|
|
|
|
# - https://gitlab.com/smart-pattern/valentina.git
|
2019-10-29 09:53:39 +01:00
|
|
|
# hg:
|
|
|
|
# - ....
|
|
|
|
# svn:
|
|
|
|
# - ....
|
|
|
|
#
|
2021-01-26 15:45:42 +01:00
|
|
|
files:
|
|
|
|
- "https://gitlab.com/smart-pattern/valentina/repository/archive.tar.gz?ref=develop"
|
2019-10-29 09:53:39 +01:00
|
|
|
|
|
|
|
# OPTIONAL: ingredient packages are packages which become part of the AppImage.
|
|
|
|
# you may want to remove parts of their content in script section.
|
2021-01-26 15:45:42 +01:00
|
|
|
ingredients:
|
|
|
|
packages:
|
|
|
|
- libqt5-qtimageformats
|
2019-10-29 09:53:39 +01:00
|
|
|
|
|
|
|
script:
|
|
|
|
# OPTIONAL: compile or modify the AppDir. The environment variables:
|
|
|
|
# - $BUILD_SOURCE_DIR point to the source directory
|
|
|
|
# - $BUILD_APPDIR point to the AppDir. This directory will become the content of the AppImage
|
2021-01-26 15:45:42 +01:00
|
|
|
- cd $BUILD_SOURCE_DIR
|
|
|
|
- mv -v "archive.tar.gz?ref=develop" valentina-develop.tar.gz
|
|
|
|
- tar zxvf $BUILD_SOURCE_DIR/valentina-develop.tar.gz
|
|
|
|
- mv -v valentina-develop-* valentina
|
|
|
|
- cd $BUILD_SOURCE_DIR/valentina
|
2019-11-29 14:15:10 +01:00
|
|
|
- qmake-qt5 PREFIX=/usr PREFIX_LIB=/usr/lib LRELEASE=lrelease-qt5 Valentina.pro -r DEFINES+=APPIMAGE "CONFIG += noTests noRunPath no_ccache noDebugSymbols"
|
2019-10-29 09:53:39 +01:00
|
|
|
- make -j$(nproc)
|
|
|
|
- make INSTALL_ROOT=$BUILD_APPDIR -j$(nproc) install
|
|
|
|
|
|
|
|
# create the image file
|
|
|
|
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
|
2021-01-23 17:47:41 +01:00
|
|
|
- rm -rf /usr/share/licenses/libqt5-qtimageformats
|
2019-11-29 14:15:10 +01:00
|
|
|
# bundle icu's data
|
|
|
|
- mkdir -p $BUILD_APPDIR/usr/share/icu
|
|
|
|
- cp /usr/share/icu/*/icudt*.dat $BUILD_APPDIR/usr/share/icu/
|
2021-01-26 15:45:42 +01:00
|
|
|
- linuxdeployqt $BUILD_APPDIR/usr/share/applications/valentina.desktop -bundle-non-qt-libs -verbose=2 -no-strip
|
2019-10-29 09:53:39 +01:00
|
|
|
# Show what we have done
|
|
|
|
- find $BUILD_APPDIR/
|