Merge pull request #735

This commit is contained in:
autocraft-bot[bot]
2026-12-01 04:54:05 +00:00
2 changed files with 41 additions and 11 deletions
+34 -10
View File
@@ -44,16 +44,27 @@ overrides:
- mesa-vulkan-drivers
- xdg-desktop-portal
rpm:
# Library sonames rather than package names, so the same requirements resolve on Fedora/RHEL
# and openSUSE (which has no libxkbcommon, vulkan-loader or libglvnd-egl package). The glibc
# floor names libm because the binaries' GLIBC_2.35 symbols (hypot, hypotf) are libm's: RHEL 9's
# glibc 2.34 provides libc.so.6(GLIBC_2.35) through backports, but not this, so it refuses.
depends:
- libxkbcommon
- alsa-lib
- (vulkan-loader or libglvnd-egl)
- libc.so.6()(64bit)
- libm.so.6(GLIBC_2.35)(64bit)
- libgcc_s.so.1()(64bit)
- libxkbcommon.so.0()(64bit)
- (libvulkan.so.1()(64bit) or libEGL.so.1()(64bit))
- libasound.so.2()(64bit)
# The windowing libraries the GUI loads at runtime, by soname too, so the recommendations resolve on
# openSUSE as well. Without libX11-xcb and libxkbcommon-x11 the GUI cannot start on X11.
recommends:
- libwayland-client
- libX11
- libXcursor
- libXi
- libXrandr
- libwayland-client.so.0()(64bit)
- libX11.so.6()(64bit)
- libXcursor.so.1()(64bit)
- libXi.so.6()(64bit)
- libX11-xcb.so.1()(64bit)
- libxkbcommon-x11.so.0()(64bit)
- libwayland-egl.so.1()(64bit)
- mesa-vulkan-drivers
- xdg-desktop-portal
@@ -64,11 +75,24 @@ contents:
- src: ${STAGE}/usr/bin/${NFPM_CLI}
dst: /usr/bin/${NFPM_CLI}
file_info: { mode: 0755 }
# Named one by one rather than as a tree of /usr/share: a tree would also own shared directories
# such as /usr/share/mime, which openSUSE's filesystem package owns with other modes, and RPM
# refuses to install a package that conflicts with it. ${NFPM_DESK_ID} and ${NFPM_NAME} are filled
# in by package.sh (a Nightly renames them), which also drops the mime entry when none is staged.
- src: ${STAGE}/usr/share/applications/${NFPM_DESK_ID}.desktop
dst: /usr/share/applications/${NFPM_DESK_ID}.desktop
- src: ${STAGE}/usr/share/mime/packages/ai.storyteller.deckcraft.xml
dst: /usr/share/mime/packages/ai.storyteller.deckcraft.xml
- src: ${STAGE}/usr/share/metainfo/${NFPM_DESK_ID}.metainfo.xml
dst: /usr/share/metainfo/${NFPM_DESK_ID}.metainfo.xml
- src: ${STAGE}/usr/share/icons/hicolor/
dst: /usr/share/icons/hicolor/
type: tree
- src: ${STAGE}/usr/lib/
dst: /usr/lib/
type: tree
- src: ${STAGE}/usr/share/
dst: /usr/share/
- src: ${STAGE}/usr/share/doc/${NFPM_NAME}/
dst: /usr/share/doc/${NFPM_NAME}/
type: tree
scripts:
+7 -1
View File
@@ -151,6 +151,7 @@ if has deb || has rpm; then
export NFPM_NAME="deckcraft"
export NFPM_BIN="deckcraft"
export NFPM_CLI="deckcraft-cli"
NFPM_DESK_ID="$APP_ID"
if [[ "$IS_NIGHTLY" = 1 ]]; then
NIGHTLY_DESK_ID="$APP_ID.nightly-v1"
NIGHTLY_ICON="$ROOT/assets/app-icon/deckcraft-nightly.png"
@@ -158,6 +159,7 @@ if has deb || has rpm; then
export NFPM_NAME="deckcraft-nightly"
export NFPM_BIN="deckcraft-nightly"
export NFPM_CLI="deckcraft-nightly-cli"
NFPM_DESK_ID="$NIGHTLY_DESK_ID"
NFPM_STAGE="$WORK/nfpm-root"
rm -rf "$NFPM_STAGE"
cp -R "$STAGE" "$NFPM_STAGE"
@@ -192,8 +194,12 @@ if has deb || has rpm; then
DROP_LIB_TREE=
# shellcheck disable=SC2016
[[ -d "$NFPM_STAGE/usr/lib" ]] || DROP_LIB_TREE='\|^ - src: \${STAGE}/usr/lib/|,+2d;'
# nfpm refuses a named file that isn't staged, and a Nightly stages no mime file.
DROP_MIME=
# shellcheck disable=SC2016
sed "${DROP_LIB_TREE}s|\${STAGE}|$NFPM_STAGE|g;s|\${NFPM_BIN}|$NFPM_BIN|g;s|\${NFPM_CLI}|$NFPM_CLI|g" "$HERE/nfpm.yaml" >"$WORK/nfpm.yaml"
[[ -d "$NFPM_STAGE/usr/share/mime" ]] || DROP_MIME='\|^ - src: \${STAGE}/usr/share/mime/|,+1d;'
# shellcheck disable=SC2016
sed "${DROP_LIB_TREE}${DROP_MIME}s|\${STAGE}|$NFPM_STAGE|g;s|\${NFPM_BIN}|$NFPM_BIN|g;s|\${NFPM_CLI}|$NFPM_CLI|g;s|\${NFPM_DESK_ID}|$NFPM_DESK_ID|g;s|\${NFPM_NAME}|$NFPM_NAME|g" "$HERE/nfpm.yaml" >"$WORK/nfpm.yaml"
for fmt in deb rpm; do
if has "$fmt"; then (cd "$ROOT" && nfpm package -f "$WORK/nfpm.yaml" -p "$fmt" -t "$DIST/$BASENAME.$fmt"); fi
done