Prevent AppStream validation error `asv-cid-desktopapp-is-not-rdns`
See https://github.com/Martchus/syncthingtray/issues/158
This commit is contained in:
parent
fdd6af1b2c
commit
da431580d4
|
@ -174,6 +174,19 @@ if (NOT META_PROJECT_LICENSE)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# determine RDNS automatically from other meta-data
|
||||||
|
if (NOT META_PROJECT_RDNS)
|
||||||
|
if (NOT META_PROJECT_RDNS_BASE)
|
||||||
|
if (META_APP_URL MATCHES ".*github\\.com.*")
|
||||||
|
set(META_PROJECT_RDNS_BASE "io.github") # assume GitHub pages
|
||||||
|
else ()
|
||||||
|
set(META_PROJECT_RDNS_BASE "org")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
string(TOLOWER "${META_APP_AUTHOR}" META_APP_AUTHOR_LOWER)
|
||||||
|
set(META_PROJECT_RDNS "${META_PROJECT_RDNS_BASE}.${META_APP_AUTHOR_LOWER}.${META_PROJECT_NAME}${TARGET_SUFFIX}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
# provide variables for other projects built as part of the same subdirs project to access files from this project
|
# provide variables for other projects built as part of the same subdirs project to access files from this project
|
||||||
get_directory_property(HAS_PARENT PARENT_DIRECTORY)
|
get_directory_property(HAS_PARENT PARENT_DIRECTORY)
|
||||||
if (HAS_PARENT)
|
if (HAS_PARENT)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component type="desktop-application">
|
<component type="desktop-application">
|
||||||
<id>@META_ID@</id>
|
<id>@META_PROJECT_RDNS@</id>
|
||||||
<metadata_license>MIT</metadata_license>
|
<metadata_license>MIT</metadata_license>
|
||||||
<project_license>@META_PROJECT_LICENSE@</project_license>
|
<project_license>@META_PROJECT_LICENSE@</project_license>
|
||||||
<name>@META_APP_NAME@</name>
|
<name>@META_APP_NAME@</name>
|
||||||
|
|
Loading…
Reference in New Issue