[LyX/master] Improve naming of program metainfo
Jean-Marc Lasgouttes <[email protected]> Fri, 05 Jun 2026 14:07:18 +0000
| Newsgroups | gmane.editors.lyx.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit acd194b7092a539f731b8444e77ae3badba0237a Author: Jean-Marc Lasgouttes <[email protected]> Date: Fri May 29 15:44:05 2026 +0200 Improve naming of program metainfo Compute compatible name for package ID. For example, if version_suffix=-1.6, then PACKAGE_ID=LyX_1_6. Rename generated desktop file to $(PACKAGE_ID).desktop Use adapted names in the metainfo file. The cmake part of computing PACKAGE_ID is not done here. Autotools part of ticket #13317 --- config/lyxinclude.m4 | 2 ++ configure.ac | 3 ++- lib/Makefile.am | 14 ++++++++++---- lib/org.lyx.LyX.metainfo.xml | 31 ------------------------------- lib/org.lyx.LyX.metainfo.xml.in | 6 +++--- 5 files changed, 17 insertions(+), 39 deletions(-) diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 0d5fc59fa2..075853d9b6 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -59,6 +59,8 @@ AC_ARG_WITH(version-suffix, RPM_VERSION_SUFFIX="--with-version-suffix=$withval"]) AC_SUBST(RPM_VERSION_SUFFIX) AC_SUBST(program_base_name,"lyx") +PACKAGE_ID=`AS_ECHO_N($PACKAGE_NAME$version_suffix) | tr -cs @<:@:alnum:@:>@ _` +AC_SUBST(PACKAGE_ID) AC_MSG_RESULT([$withval]) ]) diff --git a/configure.ac b/configure.ac index 17f4beba26..ae5572fff1 100644 --- a/configure.ac +++ b/configure.ac @@ -336,7 +336,8 @@ AC_CONFIG_FILES([Makefile \ development/cygwin/Makefile \ development/cygwin/lyxrc.dist \ development/lyx.spec \ - lib/lyx.desktop-temp:lib/lyx.desktop.in + lib/lyx.desktop-temp:lib/lyx.desktop.in \ + lib/org.lyx.LyX.metainfo.xml-temp:lib/org.lyx.LyX.metainfo.xml.in \ lib/Makefile \ lib/doc/Makefile \ lib/lyx2lyx/lyx2lyx_version.py \ diff --git a/lib/Makefile.am b/lib/Makefile.am index d7e63a18f4..1e94a5b236 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -3690,18 +3690,24 @@ fixedappicons_DATA = lyx@[email protected] # if configure is asked to generate the name with suffix directly, then # config.status refuses to rebuild this file (with a variable name), and # a build error ensues when lyx.desktop.in is changed. -lyx@[email protected]: lyx.desktop-temp +@[email protected]: lyx.desktop-temp $(AM_V_GEN)$(INSTALL_DATA) $< $@ desktopdir = $(datadir)/applications -desktop_DATA = lyx@[email protected] +desktop_DATA = @[email protected] -CLEANFILES = lyx@[email protected] lyx.desktop-temp \ +CLEANFILES = @[email protected] lyx.desktop-temp \ lyx@[email protected] lyx@[email protected] endif dist_noinst_DATA += lyx.desktop.in images/lyx.png +# if configure is asked to generate the name with suffix directly, then +# config.status refuses to rebuild this file (with a variable name), and +# a build error ensues when org.lyx.LyX.metainfo.xml.in is changed. +org.lyx.@[email protected]: org.lyx.LyX.metainfo.xml-temp + $(AM_V_GEN)$(INSTALL_DATA) $< $@ metainfodir = $(datadir)/metainfo -dist_metainfo_DATA = org.lyx.LyX.metainfo.xml +dist_metainfo_DATA = org.lyx.@[email protected] +dist_noinst_DATA += org.lyx.LyX.metainfo.xml.in exampleandtemplate_files = \ $(dist_arpresentationexamples_DATA) \ diff --git a/lib/org.lyx.LyX.metainfo.xml b/lib/org.lyx.LyX.metainfo.xml deleted file mode 100644 index f1553677c1..0000000000 --- a/lib/org.lyx.LyX.metainfo.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<component type="desktop-application"> - <id>org.lyx.LyX</id> - - <name>LyX</name> - <summary>The Document Processor</summary> - - <metadata_license>CC0-1.0</metadata_license> - <project_license>GPL-2.0-or-later</project_license> - - <description> - <p> - LyX is a document processor that encourages an approach to writing based on the structure of your documents (WYSIWYM) and not simply their appearance (WYSIWYG). - </p> - <p> - LyX combines the power and flexibility of TeX/LaTeX with the ease of use of a graphical interface. This results in world-class support for creation of mathematical content (via a fully integrated equation editor) and structured documents like academigned document layouts are built n addition, staples of scientific authoring such as reference list and index creation come standard. But you can also use LyX to create a letter or a novel or a theatre play or film script. A broad array of ready, well-designed document layouts are built in. - </p> - <p> - LyX is for people who want their writing to look great, right out of the box. No more endless tinkering with formatting details, finger painting font attributes or futzing around with page boundaries. You just write. On screen, LyX looks like any word processor; its printed output - or richly cross-referenced PDF, just as readily produced - looks like nothing else. - </p> - </description> - - <launchable type="desktop-id">lyx.desktop</launchable> - <screenshots> - <screenshot type="default"> - <image>https://www.lyx.org/images/lyx_xmlinfo_screenshot.png</image> - </screenshot> - </screenshots> - <update_contact>lyx-devel_AT_lists.lyx.org</update_contact> - <url type="homepage">https://www.lyx.org</url> -</component> diff --git a/lib/org.lyx.LyX.metainfo.xml.in b/lib/org.lyx.LyX.metainfo.xml.in index 4237e693a6..b72094be26 100644 --- a/lib/org.lyx.LyX.metainfo.xml.in +++ b/lib/org.lyx.LyX.metainfo.xml.in @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <component type="desktop-application"> - <id>org.lyx.LyX</id> + <id>org.lyx.@PACKAGE_ID@</id> - <name>LyX</name> + <name>LyX@program_suffix@</name> <summary>The Document Processor</summary> <metadata_license>CC0-1.0</metadata_license> @@ -20,7 +20,7 @@ </p> </description> - <launchable type="desktop-id">lyx@[email protected]</launchable> + <launchable type="desktop-id">@[email protected]</launchable> <screenshots> <screenshot type="default"> <image>https://www.lyx.org/images/lyx_xmlinfo_screenshot.png</image> -- lyx-cvs mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-cvs