Blame docker-builder-data/build/script/packet/synfigstudio-appimage.sh

1d4d1c
DEPS="appimagekit-master synfigstudio-master"
1d4d1c
1d4d1c
PK_APPIMAGEKIT_DIR=$PACKET_DIR/appimagekit-master/
1d4d1c
PK_APPDIR_NAME="synfigstudio"
1d4d1c
1d4d1c
pkinstall() {
8ef679
    # copy files from envdeps (install requires envdeps explicit)
8ef679
8ef679
    local APPDIR="$INSTALL_PACKET_DIR/$PK_APPDIR_NAME.AppDir"
8ef679
    mkdir -p "$APPDIR/usr"
8ef679
    mkdir -p "$APPDIR/usr/bin"
8ef679
    mkdir -p "$APPDIR/usr/lib"
8ef679
8ef679
    cp --remove-destination "$ENVDEPS_PACKET_DIR/bin/AppRun" "$APPDIR/" || return 1
8ef679
    cp --remove-destination "$ENVDEPS_PACKET_DIR/bin/desktopintegration" "$APPDIR/usr/bin/synfigstudio.wrapper"|| return 1
8ef679
8ef679
    cp --remove-destination "$FILES_PACKET_DIR/synfigstudio.desktop" "$APPDIR/" || return 1
8ef679
    cp --remove-destination "$FILES_PACKET_DIR/synfigstudio.png" "$APPDIR/" || return 1
8ef679
    cp --remove-destination "$FILES_PACKET_DIR/launch.sh" "$APPDIR/usr/bin/" || return 1
1d4d1c
}
1d4d1c
1d4d1c
pkinstall_release() {
1d4d1c
    if ! copy "$INSTALL_PACKET_DIR" "$INSTALL_RELEASE_PACKET_DIR"; then
1d4d1c
        return 1
1d4d1c
    fi
1d4d1c
8ef679
    # copy files from envdeps_release (install_release requires envdeps_release explicit)
8ef679
8ef679
    local APPDIR="$INSTALL_RELEASE_PACKET_DIR/$PK_APPDIR_NAME.AppDir"
8ef679
    copy "$ENVDEPS_RELEASE_PACKET_DIR" "$APPDIR/usr" || return 1
8ef679
8ef679
    # clean bin
8ef679
    #rm -f "$APPDIR/usr/bin/"* || return 1
8ef679
    #cp "$INSTALL_PACKET_DIR/$PK_APPDIR_NAME.AppDir/usr/bin/"*       "$APPDIR/usr/bin/" || return 1
8ef679
    #cp "$ENVDEPS_RELEASE_PACKET_DIR/bin/melt"                       "$APPDIR/usr/bin/" || return 1
8ef679
    #cp "$ENVDEPS_RELEASE_PACKET_DIR/bin/identify"                   "$APPDIR/usr/bin/" || return 1
8ef679
    #cp "$ENVDEPS_RELEASE_PACKET_DIR/bin/ffmpeg"                     "$APPDIR/usr/bin/" || return 1
8ef679
    #cp "$ENVDEPS_RELEASE_PACKET_DIR/bin/synfig"                     "$APPDIR/usr/bin/" || return 1
8ef679
    #cp "$ENVDEPS_RELEASE_PACKET_DIR/bin/synfigstudio"               "$APPDIR/usr/bin/" || return 1
8ef679
8ef679
    # clean boost
8ef679
    rm -f "$APPDIR/usr/lib/libboost_"* || return 1
8ef679
    cp "$ENVDEPS_RELEASE_PACKET_DIR/lib/libboost_chrono."*          "$APPDIR/usr/lib/" || return 1
8ef679
    cp "$ENVDEPS_RELEASE_PACKET_DIR/lib/libboost_filesystem."*      "$APPDIR/usr/lib/" || return 1
8ef679
    cp "$ENVDEPS_RELEASE_PACKET_DIR/lib/libboost_program_options."* "$APPDIR/usr/lib/" || return 1
8ef679
    cp "$ENVDEPS_RELEASE_PACKET_DIR/lib/libboost_system."*          "$APPDIR/usr/lib/" || return 1
8ef679
8ef679
    # clean examples
8ef679
    rm -rf "$APPDIR/share/synfig/examples" || return 1
8ef679
		
8ef679
    cd "$INSTALL_RELEASE_PACKET_DIR" || return 1
8ef679
    rm -f "$PK_APPDIR_NAME.tar.gz" || return 1
8ef679
    tar -czf "$PK_APPDIR_NAME.tar.gz" "$PK_APPDIR_NAME.AppDir" || return 1
8ef679
    rm -f "$INSTALL_RELEASE_PACKET_DIR/$PK_APPDIR_NAME.appimage" || return 1
8ef679
    AppImageAssistant "$APPDIR" "$INSTALL_RELEASE_PACKET_DIR/$PK_APPDIR_NAME.appimage" || return 1
8ef679
8ef679
    rm -rf "$APPDIR"
1d4d1c
}