linux: Appimage packaging

Move some files around, so that AppImages can be packaged inside a .deb for convenience.
This commit is contained in:
Tom Dewey 2024-09-09 16:33:45 +01:00 committed by Tom Dewey
parent b6cab0f7d1
commit 9264c19f76
12 changed files with 61 additions and 31 deletions

2
.gitignore vendored
View file

@ -9,8 +9,10 @@ debian/files
debian/*.substvars debian/*.substvars
debian/debhelper** debian/debhelper**
.DS_Store .DS_Store
*.DS_Store
# editor backups # editor backups
*.*swp* *.*swp*
# AppImage related # AppImage related
*.AppImage* *.AppImage*
*.appimagecraft*

View file

@ -2,7 +2,7 @@ version: 1
project: project:
name: org.raspberrypi.rpi-imager name: org.raspberrypi.rpi-imager
version_command: git describe --tags version: 1.9.0
build: build:
cmake: cmake:
@ -13,11 +13,6 @@ build:
environment: environment:
BUILD_TYPE: MinSizeRel BUILD_TYPE: MinSizeRel
scripts:
post_build:
- |
sed -i 's|Name=Imager|Name=Raspberry Pi Imager|' AppDir/usr/share/applications/org.raspberrypi.rpi-imager.desktop
appimage: appimage:
linuxdeploy: linuxdeploy:
plugins: plugins:

14
debian/changelog vendored
View file

@ -1,3 +1,17 @@
rpi-imager (1.9.0) unstable; urgency=medium
* ui: Upgrade to Qt6.7, bringing new controls to everything
* packaging: Migrate to AppImage-first distribution
* packaging: Sign with new Raspberry Pi Ltd key
* host deps: Ubuntu 22.04+, macOS 11+, Windows 10+
* Popups: Removed click-outside closing behaviour
* Selection Windows: Fixed layouts to fill the windows
* build: Dependencies have been vendored for consistency
* build: Require non-package-manager version of Qt
* security: Use platform crypto, SSL libraries where possible
-- Tom Dewey <tom.dewey@raspberrypi.com> Wed, 4 Sep 2024 18:57:00 +0000
rpi-imager (1.8.5) unstable; urgency=medium rpi-imager (1.8.5) unstable; urgency=medium
* Retry downloads on HTTP2 errors. * Retry downloads on HTTP2 errors.

16
debian/control vendored
View file

@ -1,18 +1,14 @@
Source: rpi-imager Source: rpi-imager
Section: admin Section: admin
Priority: optional Priority: optional
Maintainer: Floris Bos <bos@je-eigen-domein.nl> Maintainer: Tom Dewey <tom.dewey@raspberrypi.com>
Build-Depends: debhelper (>= 10), cmake, libarchive-dev, liblzma-dev, libcurl4-gnutls-dev | libcurl4-openssl-dev, Build-Depends: debhelper (>= 10), cmake, libgnutls28-dev
qtbase5-dev, qtbase5-dev-tools, qtdeclarative5-dev, libqt5svg5-dev, qttools5-dev, libgnutls28-dev,
qml-module-qtquick2, qml-module-qtquick-controls2, qml-module-qtquick-layouts, qml-module-qtquick-templates2, qml-module-qtquick-window2, qml-module-qtgraphicaleffects
Standards-Version: 4.1.2 Standards-Version: 4.1.2
Homepage: https://www.raspberrypi.org/ Homepage: https://www.raspberrypi.com/software
Package: rpi-imager Package: rpi-imager
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, Depends: ${shlibs:Depends}, ${misc:Depends}, dosfstools, fdisk, fuse
qml-module-qtquick2, qml-module-qtquick-controls2, qml-module-qtquick-layouts, qml-module-qtquick-templates2, qml-module-qtquick-window2, qml-module-qtgraphicaleffects,
dosfstools, fdisk
Recommends: udisks2 Recommends: udisks2
Description: Raspberry Pi imaging utility Description: Raspberry Pi Imaging utility
Graphical user-interface to write disk images and format SD cards. A user-friendly tool for creating bootable media for Raspberry Pi Devices.

6
debian/install vendored Normal file
View file

@ -0,0 +1,6 @@
rpi-imager.AppImage /usr/bin/
debian/rpi-imager.png /usr/share/icons/hicolor/128x128/apps/
debian/*.desktop /usr/share/applications/
debian/*.metainfo.xml /usr/share/metainfo/

View file

@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Version=1.9.0
Name=Raspberry Pi Imager
Name[zh_CN]=
Comment=Raspberry Pi Imager
Comment[zh_CN]=
Icon=rpi-imager
Exec=/usr/bin/rpi-imager.AppImage %F
Categories=Utility
StartupNotify=false

5
debian/postinst vendored Normal file
View file

@ -0,0 +1,5 @@
#!/bin/sh
if [ ! -x /usr/bin/rpi-imager.AppImage ]; then
chmod +x /usr/bin/rpi-imager.AppImage
fi

View file

@ -4,7 +4,7 @@
<metadata_license>CC0-1.0</metadata_license> <metadata_license>CC0-1.0</metadata_license>
<project_license>Apache-2.0</project_license> <project_license>Apache-2.0</project_license>
<name>Raspberry Pi Imager</name> <name>Raspberry Pi Imager</name>
<summary>Raspberry Pi imaging utility</summary> <summary>Raspberry Pi Imaging utility</summary>
<description> <description>
<p> <p>
Raspberry Pi Imager downloads a .JSON file from the Raspberry Pi Raspberry Pi Imager downloads a .JSON file from the Raspberry Pi
@ -52,10 +52,10 @@
</screenshots> </screenshots>
<url type="homepage">https://github.com/raspberrypi/rpi-imager</url> <url type="homepage">https://github.com/raspberrypi/rpi-imager</url>
<provides> <provides>
<binary>rpi-imager</binary> <binary>rpi-imager.AppImage</binary>
</provides> </provides>
<releases> <releases>
<release version="@IMAGER_VERSION_STR@" /> <release version="1.9.0" />
</releases> </releases>
<content_rating type="oars-1.1"> <content_rating type="oars-1.1">
<content_attribute id="social-info">moderate</content_attribute> <content_attribute id="social-info">moderate</content_attribute>

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

10
debian/rules vendored
View file

@ -1,8 +1,14 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# See debhelper(7) (uncomment to enable) # See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system. # output every command that modifies files on the build system.
#export DH_VERBOSE = 1 export DH_VERBOSE = 1
%: %:
dh $@ --sourcedirectory=src dh $@
.PHONY: override_dh_usrlocal
override_dh_usrlocal:
.PHONY: override_dh_strip
override_dh_strip:
dh_strip --exclude=AppImage

View file

@ -457,15 +457,10 @@ else()
endif() endif()
endif() endif()
configure_file( install(TARGETS ${PROJECT_NAME} DESTINATION bin)
"${CMAKE_CURRENT_SOURCE_DIR}/linux/rpi-imager.metainfo.xml.in" install(FILES "${CMAKE_CURRENT_LIST_DIR}/../debian/rpi-imager.png" DESTINATION share/icons/hicolor/128x128/apps)
"${CMAKE_CURRENT_BINARY_DIR}/rpi-imager.metainfo.xml" install(FILES "linux/org.raspberrypi.rpi-imager.desktop" DESTINATION share/applications)
@ONLY) install(FILES "${CMAKE_CURRENT_LIST_DIR}/../debian/rpi-imager.metainfo.xml" DESTINATION share/metainfo)
install(TARGETS rpi-imager DESTINATION bin)
install(FILES icons/rpi-imager.png DESTINATION share/icons/hicolor/128x128/apps)
install(FILES linux/org.raspberrypi.rpi-imager.desktop DESTINATION share/applications)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/rpi-imager.metainfo.xml" DESTINATION share/metainfo)
endif() endif()
include_directories(${CURL_INCLUDE_DIR} ${LibArchive_INCLUDE_DIR} ${LIBLZMA_INCLUDE_DIRS} ${LIBDRM_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${ZSTD_INCLUDE_DIR}) include_directories(${CURL_INCLUDE_DIR} ${LibArchive_INCLUDE_DIR} ${LIBLZMA_INCLUDE_DIRS} ${LIBDRM_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${ZSTD_INCLUDE_DIR})

View file

@ -1,7 +1,7 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Version=1.0 Version=1.0
Name=Imager Name=Raspberry Pi Imager
Name[zh_CN]= Name[zh_CN]=
Comment=Raspberry Pi Imager Comment=Raspberry Pi Imager
Comment[zh_CN]= Comment[zh_CN]=