From bcf568586de30be23bd5ff37746b6b4eb1140167 Mon Sep 17 00:00:00 2001 From: Alexander Wilms Date: Mon, 3 Sep 2018 22:04:50 +0200 Subject: [PATCH] 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 Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 1 + appdata/subsurface.appdata.xml | 67 ++++++++++++++++++------------- scripts/add-version-to-appdata.sh | 4 ++ 3 files changed, 45 insertions(+), 27 deletions(-) create mode 100755 scripts/add-version-to-appdata.sh 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 @@ - - subsurface.desktop - CC-BY-SA - Subsurface - Manage and display dive computer data - -

- Subsurface is an opensource diving logbook that runs on Linux, Windows and Mac. + + subsurface + CC-BY-SA-3.0 + GPL-2.0-only + Subsurface +

Manage and display dive computer data + +

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. -

-

- 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.

+

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. -

-

- 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.

+

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. -

-
- - http://subsurface-divelog.org/screenshots/main.png - http://subsurface-divelog.org/screenshots/preferences.png - http://subsurface-divelog.org/screenshots/preferences2.png - - http://www.http://subsurface-divelog.org/ - subsurface@subsurface-divelog.org -
+ The program is localized in about 20 languages and well supported by an active developer community.

+ + + + https://subsurface-divelog.org/screenshots/main.png + + + https://subsurface-divelog.org/screenshots/preferences.png + + + https://subsurface-divelog.org/screenshots/preferences2.png + + + https://subsurface-divelog.org + https://github.com/Subsurface-divelog/subsurface/issues + https://subsurface-divelog.org/faq/ + https://subsurface-divelog.org/documentation/ + https://www.transifex.com/subsurface/subsurface/ + + + + The Subsurface development team + subsurface@subsurface-divelog.org + + + subsurface + + 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|||" -i appdata/subsurface.appdata.xml