From 52327ab2cc5742c2a006d6be2e7b3bea677c15b1 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 6 Nov 2023 21:26:25 +0000 Subject: [PATCH] Snap stable build config for 4.4.0 --- .snapcraft.yaml | 124 ++++++++++++++++++------------- .stable_tag | 2 +- pkg/snap/warzone2100-launcher.sh | 10 ++- 3 files changed, 81 insertions(+), 55 deletions(-) diff --git a/.snapcraft.yaml b/.snapcraft.yaml index b601b48..da4a04d 100644 --- a/.snapcraft.yaml +++ b/.snapcraft.yaml @@ -3,7 +3,7 @@ name: warzone2100 # no spaces, all lower-case adopt-info: warzone2100 # specify the *part* name confinement: strict grade: stable -base: core20 +base: core22 # Enable LZO compression for the snap compression: lzo # Limit architectures to those supported by the gnome extension (and future core20) @@ -13,35 +13,36 @@ architectures: - build-on: arm64 - build-on: armhf layout: - /usr/share/vulkan: - symlink: $SNAP/usr/share/vulkan - /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_intel.so: - symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_intel.so - /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_radeon.so: - symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_radeon.so -# # Try the following once base is updated to core22 -# /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_broadcom.so: -# symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_broadcom.so -# /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_freedreno.so: -# symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_freedreno.so -# /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_lvp.so: -# symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_lvp.so - + /usr/share/libdrm: + bind: $SNAP/graphics/libdrm + /usr/share/drirc.d: + symlink: $SNAP/graphics/drirc.d + /usr/share/X11/XErrorDB: + symlink: $SNAP/graphics/X11/XErrorDB + /usr/share/X11/locale: + symlink: $SNAP/graphics/X11/locale plugs: wz2100-sequences: interface: content content: wz2100-sequences target: $SNAP/usr/share/warzone2100/sequences default-provider: warzone2100-videos + graphics-core22: + interface: content + target: $SNAP/graphics + default-provider: mesa-core22 apps: warzone2100: - extensions: [gnome-3-38] + extensions: [gnome] + command-chain: + - bin/graphics-core22-wrapper command: usr/bin/warzone2100-launcher.sh warzone2100 common-id: net.wz2100.warzone2100 # should match the appdata/metainfo file's field desktop: usr/share/applications/net.wz2100.warzone2100.desktop environment: XDG_DATA_HOME: $SNAP_USER_COMMON XDG_CONFIG_HOME: $SNAP_USER_COMMON + LIBDECOR_PLUGIN_DIR: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/libdecor/plugins-1 plugs: - audio-playback - desktop @@ -55,30 +56,31 @@ apps: - x11 parts: sdl: - source: https://github.com/libsdl-org/SDL/releases/download/release-2.26.4/SDL2-2.26.4.tar.gz - source-checksum: sha512/138f52a23d796803c450722c8a4db8226214522e99f1e5ae657e2b28eb45abf0c81c9c3df9ab16f1a07d59722ed9415d64dd04332ff040cdfbbc0329f0d05ce4 - plugin: autotools - autotools-configure-parameters: - - --prefix=/usr - - --disable-alsa - - --disable-arts - - --disable-esd - - --disable-nas - - --disable-oss + source: https://github.com/libsdl-org/SDL/releases/download/release-2.28.4/SDL2-2.28.4.tar.gz + source-checksum: sha512/16950ccedcfdef42ee6eba1a6bf09ed7231ea0205fe8600388de2aed1aba94da2e5450d16e9732dce9f12569a238730b3727bf64b8699f1fed4cb3c5c94c3eaa + plugin: cmake + cmake-parameters: + - -DCMAKE_INSTALL_PREFIX=/usr + - -DSDL_ALSA=OFF + - -DSDL_ARTS=OFF + - -DSDL_ESD=OFF + - -DSDL_NAS=OFF + - -DSDL_OSS=OFF override-build: | - snapcraftctl build - sed -i 's|"/usr"|"'"$SNAPCRAFT_STAGE/usr"'"|g' "$SNAPCRAFT_PART_INSTALL/usr/lib/cmake/SDL2/sdl2-config.cmake" + craftctl default build-packages: - git - libdbus-1-dev - libudev-dev - fcitx-libs-dev + - libdecor-0-dev - libegl1-mesa-dev - libgl1-mesa-dev - libgles2-mesa-dev - libibus-1.0-dev - libjack-dev - libpulse-dev + - libpipewire-0.3-dev - libsamplerate0-dev - libsndfile1-dev - libts-dev @@ -97,6 +99,8 @@ parts: - libxxf86vm-dev - libgbm-dev stage-packages: + - libdecor-0-0 + - libdecor-0-plugin-1 - libdbus-1-3 - libudev1 - fcitx-libs @@ -108,6 +112,7 @@ parts: - libibus-1.0-5 - libjack0 - libpulse0 + - libpipewire-0.3-0 - libsamplerate0 - libts0 - libsndfile1 @@ -130,8 +135,8 @@ parts: plugin: nil source: . override-build: | - mkdir -p "${SNAPCRAFT_PART_INSTALL}/usr/bin" - cp -av "${SNAPCRAFT_PART_SRC}/pkg/snap/warzone2100-launcher.sh" "${SNAPCRAFT_PART_INSTALL}/usr/bin/" + mkdir -p "${CRAFT_PART_INSTALL}/usr/bin" + cp -av "${CRAFT_PART_SRC}/pkg/snap/warzone2100-launcher.sh" "${CRAFT_PART_INSTALL}/usr/bin/" warzone2100: after: [sdl, launcher] plugin: cmake @@ -139,15 +144,15 @@ parts: parse-info: # Parse this appdata/metainfo file for summary, description, # and icon. Use the installed path relative to the Snap's root - - usr/share/metainfo/net.wz2100.warzone2100.appdata.xml + - usr/share/metainfo/net.wz2100.warzone2100.metainfo.xml override-pull: | # Obtain the desired tag from the .stable_tag file - echo "SNAPCRAFT_PROJECT_DIR=$SNAPCRAFT_PROJECT_DIR" - STABLE_TAG_CONFIG="$SNAPCRAFT_PROJECT_DIR/.stable_tag" + echo "CRAFT_PROJECT_DIR=$CRAFT_PROJECT_DIR" + STABLE_TAG_CONFIG="$CRAFT_PROJECT_DIR/.stable_tag" TAG_REF=$(cat "${STABLE_TAG_CONFIG}") echo "TAG_REF=$TAG_REF" - snapcraftctl pull + craftctl default echo "git submodule deinit --all" git submodule deinit --all @@ -159,37 +164,40 @@ parts: git checkout "${TAG_REF}" echo "git submodule update" git submodule update --init - snapcraftctl set-version "$TAG_REF" + craftctl set version="$TAG_REF" # Write out important release config environment variables cat > .snapenv <