Linux: rename metadata according to spec
https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html#desktop-file-idpespin/racap
parent
9a46fabf52
commit
42a09ad02e
|
@ -3150,7 +3150,7 @@ if(LINUXDEPLOYQT_EXECUTABLE AND APPIMAGETOOL_EXECUTABLE)
|
|||
# https://github.com/probonopd/linuxdeployqt/wiki/Custom-wrapper-script-instead-of-AppRun
|
||||
add_custom_target(appimage-prep
|
||||
COMMAND ${LINUXDEPLOYQT_EXECUTABLE}
|
||||
"${_ai_appdir}/usr/share/applications/wireshark.desktop"
|
||||
"${_ai_appdir}/usr/share/applications/org.wireshark.Wireshark.desktop"
|
||||
${_exe_args}
|
||||
COMMAND rm -f "${_ai_appdir}/AppRun"
|
||||
COMMAND install
|
||||
|
@ -3233,28 +3233,28 @@ install(FILES ${SHARK_PUBLIC_HEADERS}
|
|||
|
||||
# Install icons and other desktop files for Freedesktop.org-compliant desktops.
|
||||
if((BUILD_wireshark AND QT_FOUND) AND NOT (WIN32 OR APPLE))
|
||||
install(FILES wireshark-mime-package.xml
|
||||
install(FILES org.wireshark.Wireshark-mime.xml
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/mime/packages"
|
||||
RENAME wireshark.xml
|
||||
RENAME org.wireshark.Wireshark.xml
|
||||
)
|
||||
install(FILES wireshark.appdata.xml
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/appdata"
|
||||
install(FILES org.wireshark.Wireshark.metainfo.xml
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo"
|
||||
)
|
||||
if(BUILD_wireshark AND QT_FOUND)
|
||||
install(FILES wireshark.desktop
|
||||
install(FILES org.wireshark.Wireshark.desktop
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
endif()
|
||||
foreach(size 16 24 32 48 64 128 256)
|
||||
install(FILES image/wsicon${size}.png
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${size}x${size}/apps"
|
||||
RENAME wireshark.png)
|
||||
RENAME org.wireshark.Wireshark.png)
|
||||
install(FILES image/WiresharkDoc-${size}.png
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${size}x${size}/mimetypes"
|
||||
RENAME application-wireshark-doc.png)
|
||||
RENAME org.wireshark.Wireshark-mimetype.png)
|
||||
endforeach()
|
||||
install(FILES image/wsicon.svg
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
|
||||
RENAME wireshark.svg)
|
||||
RENAME org.wireshark.Wireshark.svg)
|
||||
endif()
|
||||
|
||||
install(
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
usr/bin/wireshark
|
||||
usr/share/applications/wireshark.desktop
|
||||
usr/share/applications/org.wireshark.Wireshark.desktop
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
|
||||
|
||||
NOTE: if you do add a MIME type here, don't forget to add it to the list
|
||||
of MIME types handled by Wireshark in wireshark.desktop.
|
||||
of MIME types handled by Wireshark in org.wireshark.Wireshark.desktop.
|
||||
-->
|
||||
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/vnd.tcpdump.pcap">
|
||||
<comment>Packet Capture (PCAP)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<alias type="application/x-pcap"/>
|
||||
<alias type="application/pcap"/>
|
||||
<magic>
|
||||
|
@ -47,7 +47,7 @@
|
|||
|
||||
<mime-type type="application/x-pcapng">
|
||||
<comment>Packet Capture (PCAPNG)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="big32" offset="0" value="0x0a0d0d0a">
|
||||
<match type="big32" offset="8" value="0x1a2b3c4d"/>
|
||||
|
@ -64,7 +64,7 @@
|
|||
|
||||
<mime-type type="application/x-snoop">
|
||||
<comment>Packet Capture (Snoop)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="snoop"/>
|
||||
</magic>
|
||||
|
@ -74,7 +74,7 @@
|
|||
|
||||
<mime-type type="application/x-iptrace">
|
||||
<comment>Packet Capture (AIX iptrace)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="iptrace 1.0"/>
|
||||
<match type="string" offset="0" value="iptrace 2.0"/>
|
||||
|
@ -83,7 +83,7 @@
|
|||
|
||||
<mime-type type="application/x-lanalyzer">
|
||||
<comment>Packet Capture (Novell LANalyzer)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="little16" offset="0" value="0x1001"/>
|
||||
<match type="little16" offset="0" value="0x1007"/>
|
||||
|
@ -94,7 +94,7 @@
|
|||
|
||||
<mime-type type="application/x-nettl">
|
||||
<comment>Packet Capture (HP-UX nettl)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="\x54\x52\x00\x64\x00"/>
|
||||
</magic>
|
||||
|
@ -106,7 +106,7 @@
|
|||
|
||||
<mime-type type="application/x-radcom">
|
||||
<comment>Packet Capture (Radcom WAN/LAN Analyzer)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="\x42\xd2\x00\x34\x12\x66\x22\x88"/>
|
||||
</magic>
|
||||
|
@ -114,7 +114,7 @@
|
|||
|
||||
<mime-type type="application/x-etherpeek">
|
||||
<comment>Packet Capture (Savvius/Etherpeek/Airopeek tagged/v9)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="\177ver"/>
|
||||
</magic>
|
||||
|
@ -130,7 +130,7 @@
|
|||
|
||||
<mime-type type="application/x-visualnetworks">
|
||||
<comment>Packet Capture (Visual Networks)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="\x05VNF"/>
|
||||
</magic>
|
||||
|
@ -138,7 +138,7 @@
|
|||
|
||||
<mime-type type="application/x-netinstobserver">
|
||||
<comment>Packet Capture (Network Instruments Observer)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="ObserverPktBuffe"/>
|
||||
</magic>
|
||||
|
@ -148,7 +148,7 @@
|
|||
|
||||
<mime-type type="application/x-5view">
|
||||
<comment>Packet Capture (Accellent/InfoVista 5view)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="\xaa\xaa\xaa\xaa"/>
|
||||
</magic>
|
||||
|
@ -158,7 +158,7 @@
|
|||
|
||||
<mime-type type="application/x-tektronix-rf5">
|
||||
<comment>Packet Capture (Tektronix rf5)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="\x00\x00\x02\x00\x12\x05\x00\x10"/>
|
||||
</magic>
|
||||
|
@ -168,7 +168,7 @@
|
|||
|
||||
<mime-type type="application/x-micropross-mplog">
|
||||
<comment>Packet Capture (Micropross mplog)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<magic>
|
||||
<match type="string" offset="0" value="MPCSII"/>
|
||||
</magic>
|
||||
|
@ -178,21 +178,21 @@
|
|||
|
||||
<mime-type type="application/x-apple-packetlogger">
|
||||
<comment>Packet Capture (macOS PacketLogger)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<glob pattern="*.pklg"/>
|
||||
<glob pattern="*.pklg.gz"/>
|
||||
</mime-type>
|
||||
|
||||
<mime-type type="application/x-endace-erf">
|
||||
<comment>Packet Capture (Endace ERF)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<glob pattern="*.erf"/>
|
||||
<glob pattern="*.erf.gz"/>
|
||||
</mime-type>
|
||||
|
||||
<mime-type type="application/ipfix">
|
||||
<comment>Packet Capture (IPFIX)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<glob pattern="*.ipfix"/>
|
||||
<glob pattern="*.ipfix.gz"/>
|
||||
<!-- Don't register for .pfx: that extension has another (more common) use -->
|
||||
|
@ -200,7 +200,7 @@
|
|||
|
||||
<mime-type type="application/x-ixia-vwr">
|
||||
<comment>Packet Capture (Ixia IxVeriWave)</comment>
|
||||
<generic-icon name="application-wireshark-doc"/>
|
||||
<generic-icon name="org.wireshark.Wireshark-mimetype"/>
|
||||
<glob pattern="*.vwr"/>
|
||||
<glob pattern="*.vwr.gz"/>
|
||||
</mime-type>
|
|
@ -101,7 +101,7 @@ Comment[sl]=Preučevalnik omrežnega prometa
|
|||
Comment[tr]=Ağ trafiği çözümleyicisi
|
||||
Comment[vi]=Trình phân tích giao thông mạng
|
||||
Comment[uk]=Аналізатор мережевого трафіку
|
||||
Icon=wireshark
|
||||
Icon=org.wireshark.Wireshark
|
||||
TryExec=wireshark
|
||||
Exec=wireshark %f
|
||||
Terminal=false
|
|
@ -2,7 +2,7 @@
|
|||
<!-- Copyright 2014 Richard Hughes <richard@hughsie.com> -->
|
||||
|
||||
<application>
|
||||
<id type="desktop">wireshark.desktop</id>
|
||||
<id type="desktop">org.wireshark.Wireshark</id>
|
||||
<name>Wireshark</name>
|
||||
<summary>Wireshark is the world's foremost protocol analyzer</summary>
|
||||
<content_rating type="oars-1.1"/>
|
|
@ -205,7 +205,7 @@ Requires(pre): shadow-utils
|
|||
BuildRequires: rpm >= 4.7.0
|
||||
%endif
|
||||
|
||||
# NOTE: the below description has been copied to wireshark.appdata.xml (in the
|
||||
# NOTE: the below description has been copied to org.wireshark.Wireshark.metainfo.xml (in the
|
||||
# top-level directory).
|
||||
%description
|
||||
Wireshark allows you to examine protocol data stored in files or as it is
|
||||
|
@ -426,12 +426,12 @@ cd -
|
|||
# SUSE's packaging conventions
|
||||
# (https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25suse_update_desktop_file)
|
||||
# require this:
|
||||
install -Dm 0644 %{buildroot}/usr/local/share/applications/wireshark.desktop %{buildroot}/usr/share/applications/wireshark.desktop
|
||||
install -Dm 0644 %{buildroot}/usr/local/share/applications/org.wireshark.Wireshark.desktop %{buildroot}/usr/share/applications/org.wireshark.Wireshark.desktop
|
||||
%suse_update_desktop_file %{name}
|
||||
%else
|
||||
# Fedora's packaging guidelines (https://fedoraproject.org/wiki/Packaging:Guidelines)
|
||||
# require this (at least if desktop-file-install was not used to install it).
|
||||
desktop-file-validate %{buildroot}%{_datadir}/applications/wireshark.desktop
|
||||
desktop-file-validate %{buildroot}%{_datadir}/applications/org.wireshark.Wireshark.desktop
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
@ -519,11 +519,11 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
|||
%if %{with qt5}
|
||||
%files qt
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/applications/wireshark.desktop
|
||||
%{_datadir}/applications/org.wireshark.Wireshark.desktop
|
||||
%if 0%{?suse_version}
|
||||
/usr/share/applications/wireshark.desktop
|
||||
/usr/share/applications/org.wireshark.Wireshark.desktop
|
||||
%endif
|
||||
%{_datadir}/appdata/wireshark.appdata.xml
|
||||
%{_datadir}/appdata/org.wireshark.Wireshark.metainfo.xml
|
||||
%{_datadir}/icons/hicolor/*/apps/*
|
||||
%{_datadir}/icons/hicolor/*/mimetypes/*
|
||||
%{_datadir}/mime/packages/wireshark.xml
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# update-appdata.py - Update the <releases/> section of wireshark.appdata.xml.
|
||||
# update-appdata.py - Update the <releases/> section of org.wireshark.Wireshark.metainfo.xml.
|
||||
#
|
||||
# Wireshark - Network traffic analyzer
|
||||
# By Gerald Combs <gerald@wireshark.org>
|
||||
# Copyright 1998 Gerald Combs
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
'''Update the <release> tag in wireshark.appdata.xml
|
||||
'''Update the <release> tag in org.wireshark.Wireshark.metainfo.xml
|
||||
|
||||
According to https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html
|
||||
the <releases/> tag in wireshark.appdata.xml should contain release
|
||||
the <releases/> tag in org.wireshark.Wireshark.metainfo.xml should contain release
|
||||
information sorted newest to oldest.
|
||||
|
||||
As part of our release process, when we create release tag x.y.z, we tag
|
||||
|
@ -22,7 +22,7 @@ v3.0.1 2019-04-08 release tag
|
|||
v3.0.2rc0 2019-04-08 next commit after v3.0.1
|
||||
|
||||
Find a list of release versions based on our most recent rc0 tag and
|
||||
update the <releases/> section of wireshark.appdata.xml accordingly.
|
||||
update the <releases/> section of org.wireshark.Wireshark.metainfo.xml accordingly.
|
||||
Assume that the tag for the most recent release doesn't exist and use
|
||||
today's date for it.
|
||||
'''
|
||||
|
@ -41,7 +41,7 @@ def main():
|
|||
sys.exit(2)
|
||||
|
||||
this_dir = os.path.dirname(__file__)
|
||||
appdata_xml = os.path.join(this_dir, '..', 'wireshark.appdata.xml')
|
||||
appdata_xml = os.path.join(this_dir, '..', 'org.wireshark.Wireshark.metainfo.xml')
|
||||
|
||||
try:
|
||||
tag_cp = subprocess.run(
|
||||
|
|
|
@ -341,7 +341,7 @@ wtap_get_all_capture_file_extensions_list(void)
|
|||
* NOTE: when adding file formats to this list you may also want to add them
|
||||
* to the following files so that the various desktop environments will
|
||||
* know that Wireshark can open the file:
|
||||
* 1) wireshark-mime-package.xml (for freedesktop.org environments)
|
||||
* 1) org.wireshark.Wireshark-mime.xml (for freedesktop.org environments)
|
||||
* 2) packaging/macosx/Info.plist.in (for macOS)
|
||||
* 3) packaging/nsis/AdditionalTasksPage.ini, packaging/nsis/common.nsh,
|
||||
* and packaging/wix/ComponentGroups.wxi (for Windows)
|
||||
|
|
Loading…
Reference in New Issue