Skip to content

Commit e400aff

Browse files
committed
Make metainfo and .desktop files spec compliant
This resolves bug #5890
1 parent 44c0c73 commit e400aff

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

build/linux/dist/appdata.xml

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- See https://wiki.gnome.org/GnomeGoals/AppDataGnomeSoftware -->
3-
<application>
4-
<id type="desktop">arduino.desktop</id>
5-
<licence>CC-BY-SA</licence>
2+
<!-- See https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html -->
3+
<component type="desktop-application">
4+
<id>cc.arduino.arduinoide.desktop</id>
5+
<metadata_license>FSFAP</metadata_license>
6+
7+
<name>Arduino IDE</name>
8+
<summary>Open-source electronics prototyping platform</summary>
9+
610
<description>
711
<p>
812
Arduino is an open-source electronics prototyping platform based
@@ -15,10 +19,13 @@
1519
to develop and upload code to compatible microcontrollers.
1620
</p>
1721
</description>
22+
1823
<screenshots>
1924
<screenshot type="default" width="624" height="351">http://mavit.fedorapeople.org/appdata/arduino-screenshot.png</screenshot>
2025
<screenshot width="704" height="396">http://mavit.fedorapeople.org/appdata/arduino-photo.jpg</screenshot>
2126
</screenshots>
27+
2228
<url type="homepage">http://www.arduino.cc/</url>
23-
<updatecontact>arduino.appdata.xml@mavit.org.uk</updatecontact>
24-
</application>
29+
30+
<update_contact>arduino.appdata.xml@mavit.org.uk</update_contact>
31+
</component>

build/linux/dist/install.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# If called with the "-u" option, it will undo the changes.
77

88
# Resource name to use (including vendor prefix)
9-
RESOURCE_NAME=arduino-arduinoide
9+
RESOURCE_NAME=cc.arduino.arduinoide
1010

1111
# Get absolute path from which this script file was executed
1212
# (Could be changed to "pwd -P" to resolve symlinks to their target)
@@ -85,6 +85,9 @@ simple_install_f() {
8585
mkdir -p "${HOME}/.local/share/applications"
8686
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${HOME}/.local/share/applications/"
8787

88+
mkdir -p "${HOME}/.local/share/metainfo"
89+
cp "${SCRIPT_PATH}/lib/appdata.xml" "${HOME}/.local/share/metainfo/"
90+
8891
# Copy desktop icon if desktop dir exists (was found)
8992
if [ -d "${XDG_DESKTOP_DIR}" ]; then
9093
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${XDG_DESKTOP_DIR}/"
@@ -141,10 +144,18 @@ simple_uninstall_f() {
141144
rm "${HOME}/.local/share/applications/arduino.desktop"
142145
fi
143146

147+
if [ -f "${HOME}/.local/share/applications/arduino-arduinoide.desktop" ]; then
148+
rm "${HOME}/.local/share/applications/arduino-arduinoide.desktop"
149+
fi
150+
144151
if [ -f "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop" ]; then
145152
rm "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop"
146153
fi
147154

155+
if [ -f "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml" ]; then
156+
rm "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml"
157+
fi
158+
148159
if [ -f "${XDG_DESKTOP_DIR}/arduino.desktop" ]; then
149160
rm "${XDG_DESKTOP_DIR}/arduino.desktop"
150161
fi

0 commit comments

Comments
 (0)