File appimage.yml of Package freeorion

app: freeorion

build:
  packages:
    - linuxdeployqt
    - cmake
    - gcc5-c++
    - google-roboto-fonts
    - hicolor-icon-theme
    - boost_1_61-devel
    - libpng-devel
    - python3-devel >= 3.5
    - freetype2-devel
    - glew-devel
    - glu-devel
    - openal-devel
    - libSDL2-devel
    - libvorbis-devel
    - zlib-devel

script:
#           - $BUILD_SOURCE_DIR point to the source directory
#           - $BUILD_APPDIR point to the AppDir. This directory will become the content of the AppImage


## Building
  - cd $BUILD_SOURCE_DIR
  - tar xfz FreeOrion*_Source.tar.gz
  - cd src-tarball
  - patch -p1 < ../freeorion-0.4.10-cmake_python.patch
  - mkdir build
  - cd build
  - export CC=gcc-5; export CXX=g++-5
  - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") ..
  - make -j2

## Installing
  - make install DESTDIR=$(readlink -f $BUILD_APPDIR)
  # Workaround rpath/linking issues. linuxdeployqt should fix up the shared libs
  - mv $BUILD_APPDIR/usr/lib/freeorion/* $BUILD_APPDIR/usr/lib/
  # Missing dynamically loaded libs (I think)
  - cp /usr/lib64/libboost_python3.so.1.61.0 $BUILD_APPDIR/usr/lib/
  
  # Python install
  - mkdir -p $BUILD_APPDIR/usr/lib
  - cp -a /usr/lib64/python3.6 $BUILD_APPDIR/usr/lib/
  
 # Clean a little
  # openSUSE leftovers
  - rm -r $BUILD_APPDIR/var
  - rm -r $BUILD_APPDIR/etc

## create the image file
  - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
  - linuxdeployqt $BUILD_APPDIR/usr/share/applications/org.freeorion.FreeOrion.desktop -no-strip -bundle-non-qt-libs -verbose=1
  
  # Some libs not executable?
  #- chmod +x $BUILD_APPDIR/usr/lib/*
  # Use custom AppRun in order to set PYTHONPATH
  - rm $BUILD_APPDIR/AppRun
  - cp $BUILD_SOURCE_DIR/AppRun $BUILD_APPDIR
  - chmod +x $BUILD_APPDIR/AppRun
  
  - find $BUILD_APPDIR/
openSUSE Build Service is sponsored by