File appimage.yml of Package notekit

# Recipe for the AppImage (on OBS) build of NoteKit
# Copyright (C) 2021/22 Florian "sp1rit" <packaging@sp1rit.anonaddy.me>
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
# 
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

app: notekit

build:
  packages:
    - linuxdeployqt
    - gcc-c++
    - meson
    - pkgconfig
    - pkgconfig(clatexmath)
    - pkgconfig(gtkmm-3.0)
    - pkgconfig(gtksourceviewmm-3.0)
    - pkgconfig(jsoncpp)
    - pkgconfig(zlib)
    - pkgconfig(fontconfig)
    - glib2-tools
    - gnome-settings-daemon
    - gtk3-schema
  files:
    - notekit-*.tar.xz

script:
  - NOTEKIT="$(basename $BUILD_SOURCE_DIR/notekit-*)"
  # NoteKit
  - meson $BUILD_SOURCE_DIR/$NOTEKIT $BUILD_SOURCE_DIR/$NOTEKIT/$(g++ -dumpmachine) --prefix=/usr
  - ninja -C $BUILD_SOURCE_DIR/$NOTEKIT/$(g++ -dumpmachine)
  - DESTDIR=$BUILD_APPDIR meson install -C $BUILD_SOURCE_DIR/$NOTEKIT/$(g++ -dumpmachine)

  # installing cLaTeXMath to bundle
  - cp -r /usr/share/clatexmath $BUILD_APPDIR/usr/share/notekit/data/latex
  
  # adding gschemas, otherwise it won't work
  - mkdir -p $BUILD_APPDIR/usr/share/glib-2.0/
  - cp -r /usr/share/glib-2.0/schemas/* $BUILD_APPDIR/usr/share/glib-2.0/schemas/
  - glib-compile-schemas --targetdir $BUILD_APPDIR/usr/share/glib-2.0/schemas/ $BUILD_APPDIR/usr/share/glib-2.0/schemas/

# create the image file
  - cp $BUILD_SOURCE_DIR/$NOTEKIT/freedesktop/com.github.blackhole89.notekit.png $BUILD_APPDIR/.DirIcon
  - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
  - linuxdeployqt $BUILD_APPDIR/usr/share/applications/com.github.blackhole89.notekit.desktop -bundle-non-qt-libs -exclude-libs=libgmodule-2.0.so.0,libselinux.so.1,libmount.so.1,libsystemd.so.0,libdbus-1.so.3 -no-strip
  - find $BUILD_APPDIR/
openSUSE Build Service is sponsored by