File appimage.yml of Package cpu-x

app: CPU-X

build:
  packages:
    - gcc
    - gcc-c++
    - pkgconfig
    - cmake
    - nasm
    - gettext
    - intltool
    - gtk3-devel
    - ncurses-devel
    - libcurl-devel
    - libjson-c-devel
    - libcpuid-devel
    - procps-devel
    - pciutils-devel

  files:
    - CPU-X.tar.gz
    - linuxdeployqt-5-x86_64.AppImage

script:
  - cat /etc/os-release
  - cd $BUILD_SOURCE_DIR
  - cp -v ncursesw.pc /usr/lib64/pkgconfig/ncursesw.pc
  - tar -zxvf CPU-X.tar.gz
  - mkdir -pv CPU-X/build && cd $_
  - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
  - make -j$(nproc)
  - make DESTDIR=$(readlink -f $BUILD_APPDIR) install
  - cp -v "$BUILD_APPDIR/usr/share/applications/cpu-x.desktop" "$BUILD_APPDIR/"
  - cp -v "$BUILD_APPDIR/usr/share/icons/hicolor/96x96/apps/cpu-x.png" "$BUILD_APPDIR/"
  - sed -i 's|/usr/bin/cpu-x|cpu-x_polkit|g' "$BUILD_APPDIR/cpu-x.desktop"
  - sed -i 's|/usr/bin/cpu-x|cpu-x|g'        "$BUILD_APPDIR/usr/bin/cpu-x_polkit"
  - mkdir -pv "$BUILD_APPDIR/usr/share/"
  - cp -Rv "/usr/share/terminfo/" "$BUILD_APPDIR/usr/share/"
  #- mkdir -pv "$BUILD_APPDIR/usr/lib64/gdk-pixbuf-2.0/"
  #- cp -Rv "/usr/lib64/"{gdk-pixbuf-2.0,gtk-3.0} "$BUILD_APPDIR/usr/lib64/"
  - chmod -v +x $BUILD_SOURCE_DIR/linuxdeployqt-5-x86_64.AppImage
  - $BUILD_SOURCE_DIR/linuxdeployqt-5-x86_64.AppImage "$BUILD_APPDIR/usr/share/applications/cpu-x.desktop" -bundle-non-qt-libs
  #- linuxdeployqt $BUILD_APPDIR/usr/share/applications/cpu-x.desktop -bundle-non-qt-libs -no-strip
  - rm -rfv $BUILD_APPDIR/{etc,var}
  - gcc $BUILD_SOURCE_DIR/AppRun.c -o $BUILD_APPDIR/AppRun
  #- find $BUILD_APPDIR/