diff options
author | Alexander Wilms <f.alexander.wilms@gmail.com> | 2018-09-03 22:04:50 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-09 18:43:30 -0700 |
commit | bcf568586de30be23bd5ff37746b6b4eb1140167 (patch) | |
tree | f69e7d1cd000457e816b42a684ad1eb150bb350e | |
parent | 39b52d8abff9f8bd91c5e5031eb8f9f48a92f3bb (diff) | |
download | subsurface-bcf568586de30be23bd5ff37746b6b4eb1140167.tar.gz |
Fix appdata
Use correct format, create script to update the version and release date in the
appdata.
[Dirk Hohndel: call said script during the build process]
Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | appdata/subsurface.appdata.xml | 67 | ||||
-rwxr-xr-x | scripts/add-version-to-appdata.sh | 4 |
3 files changed, 45 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c967ca548..a4a82f640 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -519,6 +519,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") endif() install(FILES subsurface.debug DESTINATION bin) install(FILES subsurface.desktop DESTINATION share/applications) + install(CODE "execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/add-version-to-appdata.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})") install(FILES appdata/subsurface.appdata.xml DESTINATION share/metainfo) install(FILES icons/subsurface-icon.svg DESTINATION share/icons/hicolor/scalable/apps) install(DIRECTORY Documentation/images DESTINATION share/subsurface/Documentation) diff --git a/appdata/subsurface.appdata.xml b/appdata/subsurface.appdata.xml index 848fa3b1a..8d25d5a36 100644 --- a/appdata/subsurface.appdata.xml +++ b/appdata/subsurface.appdata.xml @@ -1,34 +1,47 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2014 Pedro Neves <nevesdiver@gmail.com> --> -<application> - <id type="desktop">subsurface.desktop</id> - <licence>CC-BY-SA</licence> - <name>Subsurface</name> - <summary>Manage and display dive computer data</summary> - <description> - <p> - Subsurface is an opensource diving logbook that runs on Linux, Windows and Mac. +<component type="desktop-application"> + <id>subsurface</id> + <metadata_license>CC-BY-SA-3.0</metadata_license> + <project_license>GPL-2.0-only</project_license> + <name>Subsurface</name> + <summary>Manage and display dive computer data</summary> + <description> + <p>Subsurface is an opensource diving logbook that runs on Linux, Windows and Mac. With this program, users can keep track of their dives by logging dive locations (with GPS coordinates), weights and exposure protection used, divemasters and dive buddies, etc. - Subsurface also enables the users to rate their dives and provide additional dive notes. - </p> - <p> - Dives can be downloaded from a variety of dive computers, inserted manually or imported from other programs. + Subsurface also enables the users to rate their dives and provide additional dive notes.</p> + <p>Dives can be downloaded from a variety of dive computers, inserted manually or imported from other programs. A wide array of diving statistics and information is calculated and displayed, like the user’s SAC rate, - partial pressures of O2, N2 and He, calculated deco information, and many more. - </p> - <p> - The dive profiles (and the tank pressure curves) can be visualized in a comprehensive and clean way, that + partial pressures of O2, N2 and He, calculated deco information, and many more.</p> + <p>The dive profiles (and the tank pressure curves) can be visualized in a comprehensive and clean way, that provides the user with additional information on relative velocity (and momentary air consumption) during the dive. Subsurface also allows the user to print out a detailed log book that includes dive profiles and other relevant information. - The program is localized in about 20 languages and well supported by an active developer community. - </p> - </description> - <screenshots> - <screenshot type="default" width="1860" height="1046">http://subsurface-divelog.org/screenshots/main.png</screenshot> - <screenshot width="778" height="438">http://subsurface-divelog.org/screenshots/preferences.png</screenshot> - <screenshot width="782" height="440">http://subsurface-divelog.org/screenshots/preferences2.png</screenshot> - </screenshots> - <url type="homepage">http://www.http://subsurface-divelog.org/</url> - <updatecontact>subsurface@subsurface-divelog.org</updatecontact> -</application> + The program is localized in about 20 languages and well supported by an active developer community.</p> + </description> + <screenshots> + <screenshot type="default"> + <image>https://subsurface-divelog.org/screenshots/main.png</image> + </screenshot> + <screenshot> + <image>https://subsurface-divelog.org/screenshots/preferences.png</image> + </screenshot> + <screenshot> + <image>https://subsurface-divelog.org/screenshots/preferences2.png</image> + </screenshot> + </screenshots> + <url type="homepage">https://subsurface-divelog.org</url> + <url type="bugtracker">https://github.com/Subsurface-divelog/subsurface/issues</url> + <url type="faq">https://subsurface-divelog.org/faq/</url> + <url type="help">https://subsurface-divelog.org/documentation/</url> + <url type="translate">https://www.transifex.com/subsurface/subsurface/</url> + <releases> + <release version="" date="" /> + </releases> + <developer_name>The Subsurface development team</developer_name> + <update_contact>subsurface@subsurface-divelog.org</update_contact> + <content_rating type="oars-1.1" /> + <provides> + <binary>subsurface</binary> + </provides> +</component> diff --git a/scripts/add-version-to-appdata.sh b/scripts/add-version-to-appdata.sh new file mode 100755 index 000000000..a9f3b98ea --- /dev/null +++ b/scripts/add-version-to-appdata.sh @@ -0,0 +1,4 @@ +#!/bin/sh +version=$(git describe --abbrev=12) +date=$(git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d) +sed -e "s|<release version=\"\" date=\"\" />|<release version=\"$version\" date=\"$date\" />|" -i appdata/subsurface.appdata.xml |