name: tube-converter base: core22 adopt-info: tube-converter grade: stable confinement: strict compression: lzo architectures: - build-on: amd64 - build-on: arm64 - build-on: armhf parts: yt-dlp: plugin: python source: https://github.com/yt-dlp/yt-dlp.git source-depth: 1 source-tag: '2024.04.09' build-environment: # WORKAROUND: The python plugin is broken with gnome extension - PATH: ${CRAFT_PART_INSTALL}/bin:${PATH} - PYTHONPATH: "" prime: # WORKAROUND: Skip venv from python plugin - -usr/bin/activate - -usr/bin/activate.csh - -usr/bin/activate.fish - -usr/bin/Activate.ps1 - -usr/bin/python - -usr/bin/python3 - -usr/bin/python3.10 - -usr/bin/pip - -usr/bin/pip3 - -usr/bin/pip3.10 - -usr/bin/wheel - -usr/lib/python3.10/dist-packages/pip* - -usr/lib/python3.10/dist-packages/pkg_resources - -usr/lib/python3.10/dist-packages/setuptools* - -pyvenv.cfg - -lib - -lib64 - -include - -share organize: bin: usr/bin lib/python3.10/site-packages: usr/lib/python3.10/dist-packages tube-converter: after: [ yt-dlp ] plugin: nil source: . build-packages: - brotli - blueprint-compiler - wget build-environment: - DOTNET_CLI_TELEMETRY_OPTOUT: '1' - PATH: $PATH:$HOME/.dotnet:$HOME/.dotnet/tools - DOTNET_ROOT: $HOME/.dotnet override-pull: | craftctl default wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh chmod +x ./dotnet-install.sh ./dotnet-install.sh --channel 8.0 patch -p1 < $CRAFT_PROJECT_DIR/snap/tube-converter.patch override-build: | craftctl default cd $CRAFT_PART_SRC dotnet tool restore dotnet cake --target=Publish --prefix=/snap/tube-converter/current/usr --ui=gnome --self-contained dotnet cake --target=Install --destdir=$CRAFT_PART_INSTALL mkdir -p $CRAFT_PART_INSTALL/meta/gui cp -r $CRAFT_PART_INSTALL/snap/tube-converter/current/usr/share/icons $CRAFT_PART_INSTALL/meta/gui/ for i in `find $CRAFT_PART_INSTALL/meta/gui/icons -name "*.svg" -o -name "*.png"`; do mv $i "`dirname $i`/snap.$CRAFT_PROJECT_NAME.`basename $i`" done prime: - -snap/tube-converter organize: snap/tube-converter/current: . parse-info: [usr/share/metainfo/org.nickvision.tubeconverter.metainfo.xml] deps: plugin: nil stage-packages: - aria2 - libc-ares2 - libaria2-0 prime: - usr/lib/$CRAFT_ARCH_TRIPLET/libaria2.so.0 - usr/lib/$CRAFT_ARCH_TRIPLET/libaria2.so.0.0.0 - usr/lib/$CRAFT_ARCH_TRIPLET/libcares.so.2 - usr/lib/$CRAFT_ARCH_TRIPLET/libcares.so.2.5.1 - usr/bin/aria2c plugs: ffmpeg-2204: interface: content target: ffmpeg-platform default-provider: ffmpeg-2204 slots: # for GtkApplication registration tube-converter: interface: dbus bus: session name: org.nickvision.tubeconverter apps: tube-converter: command: usr/bin/org.nickvision.tubeconverter extensions: - gnome common-id: org.nickvision.tubeconverter environment: PYTHONPATH: $SNAP/usr/lib/python3.10/dist-packages:$PYTHONPATH PATH: $SNAP/ffmpeg-platform/usr/bin:$PATH LD_LIBRARY_PATH: $SNAP/ffmpeg-platform/usr/lib/$CRAFT_ARCH_TRIPLET:$LD_LIBRARY_PATH plugs: - home - network - network-status - mount-observe - unity7 - screen-inhibit-control - password-manager-service