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() {
1d4d1c
	# copy files from envdeps (install requires envdeps explicit)
1d4d1c
	
1d4d1c
	local APPDIR="$INSTALL_PACKET_DIR/$PK_APPDIR_NAME.AppDir"
1d4d1c
	mkdir -p "$APPDIR/usr"
1d4d1c
	mkdir -p "$APPDIR/usr/bin"
1d4d1c
	mkdir -p "$APPDIR/usr/lib"
1d4d1c
	
1d4d1c
	cp --remove-destination "$ENVDEPS_PACKET_DIR/bin/AppRun" "$APPDIR/" || return 1
1d4d1c
	cp --remove-destination "$ENVDEPS_PACKET_DIR/bin/desktopintegration" "$APPDIR/usr/bin/synfigstudio.wrapper"|| return 1
1d4d1c
35e704
	cp --remove-destination "$FILES_PACKET_DIR/synfigstudio.desktop" "$APPDIR/" || return 1
35e704
	cp --remove-destination "$FILES_PACKET_DIR/synfigstudio.png" "$APPDIR/" || return 1
35e704
	cp --remove-destination "$FILES_PACKET_DIR/launch.sh" "$APPDIR/usr/bin/" || return 1
35e704
35e704
	copy_system_lib libudev     "$APPDIR/usr/lib/" || return 1
35e704
	copy_system_lib libgfortran "$APPDIR/usr/lib/" || return 1
35e704
	copy_system_lib libpng12    "$APPDIR/usr/lib/" || return 1
35e704
	copy_system_lib libffi      "$APPDIR/usr/lib/" || return 1
35e704
	copy_system_lib libdb       "$APPDIR/usr/lib/" || return 1
35e704
	copy_system_lib libpcre     "$APPDIR/usr/lib/" || return 1
35e704
	copy_system_lib libdirect   "$APPDIR/usr/lib/" || return 1
35e704
	copy_system_lib libfusion   "$APPDIR/usr/lib/" || return 1
1d4d1c
}
1d4d1c
1d4d1c
pkinstall_release() {
1d4d1c
    if ! copy "$INSTALL_PACKET_DIR" "$INSTALL_RELEASE_PACKET_DIR"; then
1d4d1c
        return 1
1d4d1c
    fi
1d4d1c
1d4d1c
	# copy files from envdeps_release (install_release requires envdeps_release explicit)
1d4d1c
1d4d1c
	local APPDIR="$INSTALL_RELEASE_PACKET_DIR/$PK_APPDIR_NAME.AppDir"
1d4d1c
	copy "$ENVDEPS_RELEASE_PACKET_DIR" "$APPDIR/usr" || return 1
1d4d1c
	
1d4d1c
	# clean bin
21c025
	#rm -f $APPDIR/usr/bin/* || return 1
21c025
	#cp $INSTALL_PACKET_DIR/$PK_APPDIR_NAME.AppDir/usr/bin/*       $APPDIR/usr/bin/ || return 1
21c025
	#cp $ENVDEPS_RELEASE_PACKET_DIR/bin/melt                       $APPDIR/usr/bin/ || return 1
21c025
	#cp $ENVDEPS_RELEASE_PACKET_DIR/bin/identify                   $APPDIR/usr/bin/ || return 1
21c025
	#cp $ENVDEPS_RELEASE_PACKET_DIR/bin/synfig                     $APPDIR/usr/bin/ || return 1
21c025
	#cp $ENVDEPS_RELEASE_PACKET_DIR/bin/synfigstudio               $APPDIR/usr/bin/ || return 1
1d4d1c
			
1d4d1c
	# clean boost
1d4d1c
	rm -f $APPDIR/usr/lib/libboost_* || return 1
1d4d1c
	cp $ENVDEPS_RELEASE_PACKET_DIR/lib/libboost_chrono.*          $APPDIR/usr/lib/ || return 1
1d4d1c
	cp $ENVDEPS_RELEASE_PACKET_DIR/lib/libboost_filesystem.*      $APPDIR/usr/lib/ || return 1
1d4d1c
	cp $ENVDEPS_RELEASE_PACKET_DIR/lib/libboost_program_options.* $APPDIR/usr/lib/ || return 1
1d4d1c
	cp $ENVDEPS_RELEASE_PACKET_DIR/lib/libboost_system.*          $APPDIR/usr/lib/ || return 1
1d4d1c
	
1d4d1c
	cd "$INSTALL_RELEASE_PACKET_DIR" || return 1
1d4d1c
	rm -f "$PK_APPDIR_NAME.tar.gz" || return 1
1d4d1c
	tar -czf "$PK_APPDIR_NAME.tar.gz" "$PK_APPDIR_NAME.AppDir" || return 1
1d4d1c
	rm -f "$INSTALL_RELEASE_PACKET_DIR/$PK_APPDIR_NAME.appimage" || return 1
1d4d1c
	AppImageAssistant "$APPDIR" "$INSTALL_RELEASE_PACKET_DIR/$PK_APPDIR_NAME.appimage" || return 1
1d4d1c
	
1d4d1c
	rm -rf "$APPDIR"
1d4d1c
}