1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 04:56:12 +03:00

include appstream data in AppImage

This commit is contained in:
Wez Furlong 2020-05-04 22:55:33 -07:00
parent d740281fde
commit 90de55f807
3 changed files with 16 additions and 9 deletions

View File

@ -7,19 +7,19 @@ install -Dsm755 -t AppDir/usr/bin target/release/wezterm
install -Dm644 assets/icon/terminal.png AppDir/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
install -Dm644 -t AppDir/usr/share/wezterm/colors assets/colors/*
install -Dm644 assets/wezterm.desktop AppDir/usr/share/applications/org.wezfurlong.wezterm.desktop
# [appimage/stderr] /usr/bin/appstream-util: symbol lookup error: /lib64/libsoup-2.4.so.1: undefined symbol: g_file_info_get_modification_date_time
# install -Dm644 assets/wezterm.appdata.xml AppDir/usr/share/metainfo/wezterm.appdata.xml
install -Dm644 assets/wezterm.appdata.xml AppDir/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
[ -x /tmp/linuxdeploy ] || ( curl -L 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage' -o /tmp/linuxdeploy && chmod +x /tmp/linuxdeploy )
/tmp/linuxdeploy \
TAG_NAME=${TAG_NAME:-$(git describe --tags)}
TAG_NAME=${TAG_NAME:-$(date +'%Y%m%d-%H%M%S')-$(git log --format=%h -1)}
# Munge the path so that it finds our appstreamcli wrapper
PATH="$PWD/ci:$PATH" VERSION="$TAG_NAME" /tmp/linuxdeploy \
--appdir AppDir \
--output appimage \
--desktop-file assets/wezterm.desktop
TAG_NAME=${TAG_NAME:-$(git describe --tags)}
TAG_NAME=${TAG_NAME:-$(date +'%Y%m%d-%H%M%S')-$(git log --format=%h -1)}
distro=$(lsb_release -is)
distver=$(lsb_release -rs)

7
ci/appstreamcli Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# When invoked via linuxdeploy.AppImage, the LD_LIBRARY_PATH resolves
# shared objects to the AppImage rather than the system, which causes
# appstreamcli to fail on Fedora, hence this wrapper script to clean
# up the environment.
unset LD_LIBRARY_PATH
exec /usr/bin/appstreamcli "$@"

View File

@ -79,14 +79,14 @@ install -Dsm755 target/release/wezterm %{buildroot}/usr/bin
install -Dm644 assets/icon/terminal.png %{buildroot}/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
install -Dm644 -t %{buildroot}/usr/share/wezterm/colors assets/colors/*
install -Dm644 assets/wezterm.desktop %{buildroot}/usr/share/applications/org.wezfurlong.wezterm.desktop
install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/wezterm.appdata.xml
install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
%files
/usr/bin/wezterm
/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
/usr/share/wezterm/colors/*
/usr/share/applications/org.wezfurlong.wezterm.desktop
/usr/share/metainfo/wezterm.appdata.xml
/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
EOF
/usr/bin/rpmbuild -bb --rmspec wezterm.spec --verbose
@ -113,7 +113,7 @@ EOF
install -Dm644 assets/icon/terminal.png pkg/debian/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
install -Dm644 -t pkg/debian/usr/share/wezterm/colors assets/colors/*
install -Dm644 assets/wezterm.desktop pkg/debian/usr/share/applications/org.wezfurlong.wezterm.desktop
install -Dm644 assets/wezterm.appdata.xml pkg/debian/usr/share/metainfo/wezterm.appdata.xml
install -Dm644 assets/wezterm.appdata.xml pkg/debian/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
if [[ "$BUILD_REASON" == "Schedule" ]] ; then
debname=wezterm-nightly.$distro$distver
else