From 06a7812f1b82dbfc6cc982f0dbdfbeee8f32f325 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 12 Oct 2022 17:12:24 +0300 Subject: [PATCH 20/20] Generate .metainfo.xml under bootstrap/ See osdn #45840 Signed-off-by: Marko Lindqvist --- bootstrap/Makefile.am | 48 +++++++++++++++++++++++++++++++++++++++ client/Makefile.am | 38 +++++++++++-------------------- configure.ac | 26 ++++++++++----------- server/Makefile.am | 4 ---- tools/Makefile.am | 23 ++++--------------- tools/ruledit/Makefile.am | 4 +--- 6 files changed, 79 insertions(+), 64 deletions(-) diff --git a/bootstrap/Makefile.am b/bootstrap/Makefile.am index db254c75b4..96a8ef098f 100644 --- a/bootstrap/Makefile.am +++ b/bootstrap/Makefile.am @@ -1,5 +1,7 @@ ## Process this file with automake to produce Makefile.in +metainfofiledir = @METAINFODIR@ + ## Automake should distribute config.rpath automatically - and new ## versions probably do. We still support versions that do not, so ## it's in the list below. @@ -43,6 +45,52 @@ EXTRA_DIST = freeciv.project \ Makerules.mk \ langnames.txt +metainfofile_DATA = + +if SERVER +metainfofile_DATA += org.freeciv.server.appdata.xml +endif + +if CLIENT_GUI_SDL2 +metainfofile_DATA += org.freeciv.sdl2.appdata.xml +endif + +if CLIENT_GUI_GTK_2_0 +metainfofile_DATA += org.freeciv.gtk2.appdata.xml +endif + +if CLIENT_GUI_GTK_3_0 +metainfofile_DATA += org.freeciv.gtk3.appdata.xml +endif + +if CLIENT_GUI_GTK_3_22 +metainfofile_DATA += org.freeciv.gtk322.appdata.xml +endif + +if CLIENT_GUI_QT +metainfofile_DATA += org.freeciv.qt.appdata.xml +endif + +if MODINST_GTK2 +metainfofile_DATA += org.freeciv.mp.gtk2.appdata.xml +endif + +if MODINST_GTK3 +metainfofile_DATA += org.freeciv.mp.gtk3.appdata.xml +endif + +if MODINST_GTK4 +metainfofile_DATA += org.freeciv.mp.gtk4.appdata.xml +endif + +if MODINST_QT +metainfofile_DATA += org.freeciv.mp.qt.appdata.xml +endif + +if RULEDIT +metainfofile_DATA += org.freeciv.ruledit.appdata.xml +endif + langstat_core.txt: "$(top_srcdir)/bootstrap/generate_langstat.sh" core "$(top_srcdir)" "$(top_builddir)" diff --git a/client/Makefile.am b/client/Makefile.am index 87367586a7..9e1dab35ff 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -4,58 +4,46 @@ GUI_SUBDIRS = desktopfiledir = @DESKTOPDIR@ -appdatafiledir = @APPDATADIR@ desktopfile_DATA = -appdatafile_DATA = if CLIENT_GUI_SDL2 GUI_SUBDIRS += gui-sdl2 -desktopfile_DATA += \ - org.freeciv.sdl2.desktop -appdatafile_DATA += \ - org.freeciv.sdl2.appdata.xml +desktopfile_DATA += org.freeciv.sdl2.desktop endif + if CLIENT_GUI_GTK_2_0 GUI_SUBDIRS += gui-gtk-2.0 -desktopfile_DATA += \ - org.freeciv.gtk2.desktop -appdatafile_DATA += \ - org.freeciv.gtk2.appdata.xml +desktopfile_DATA += org.freeciv.gtk2.desktop endif + if CLIENT_GUI_GTK_3_0 GUI_SUBDIRS += gui-gtk-3.0 -desktopfile_DATA += \ - org.freeciv.gtk3.desktop -appdatafile_DATA += \ - org.freeciv.gtk3.appdata.xml +desktopfile_DATA += org.freeciv.gtk3.desktop endif + if CLIENT_GUI_GTK_3_22 GUI_SUBDIRS += gui-gtk-3.22 -desktopfile_DATA += \ - org.freeciv.gtk322.desktop -appdatafile_DATA += \ - org.freeciv.gtk322.appdata.xml +desktopfile_DATA += org.freeciv.gtk322.desktop endif + if CLIENT_GUI_QT GUI_SUBDIRS += gui-qt -desktopfile_DATA += \ - org.freeciv.qt.desktop -appdatafile_DATA += \ - org.freeciv.qt.appdata.xml +desktopfile_DATA += org.freeciv.qt.desktop endif + if CLIENT_GUI_STUB GUI_SUBDIRS += gui-stub endif -ALL_AUDIO_SDL_FILES=audio_sdl.c audio_sdl.h +ALL_AUDIO_SDL_FILES = audio_sdl.c audio_sdl.h if AUDIO_SDL -AUDIO_SDL_FILES=$(ALL_AUDIO_SDL_FILES) +AUDIO_SDL_FILES = $(ALL_AUDIO_SDL_FILES) endif if MINGW -CLIENTICON=../windows/clienticon.o +CLIENTICON = ../windows/clienticon.o endif EXTRA_DIST= $(ALL_AUDIO_SDL_FILES) diff --git a/configure.ac b/configure.ac index 9ade5d14b0..8ebdc1216b 100644 --- a/configure.ac +++ b/configure.ac @@ -324,8 +324,8 @@ AC_SUBST([DESKTOPDIR]) AC_ARG_WITH([appdatadir], AS_HELP_STRING([--with-appdatadir], [install appdata files to given dir]), -[ APPDATADIR=${withval} ], [ APPDATADIR="\$(prefix)/share/metainfo" ]) -AC_SUBST([APPDATADIR]) +[ METAINFODIR=${withval} ], [ METAINFODIR="\$(prefix)/share/metainfo" ]) +AC_SUBST([METAINFODIR]) AC_ARG_ENABLE([patient-connect], AS_HELP_STRING([--enable-patient-connect=yes/no], @@ -1854,17 +1854,17 @@ AC_CONFIG_FILES([Makefile tools/org.freeciv.mp.gtk4.desktop:bootstrap/org.freeciv.mp.gtk4.desktop.in tools/org.freeciv.mp.qt.desktop:bootstrap/org.freeciv.mp.qt.desktop.in tools/ruledit/org.freeciv.ruledit.desktop:bootstrap/org.freeciv.ruledit.desktop.in - client/org.freeciv.gtk2.appdata.xml:bootstrap/org.freeciv.gtk2.appdata.xml.in - client/org.freeciv.gtk3.appdata.xml:bootstrap/org.freeciv.gtk3.appdata.xml.in - client/org.freeciv.gtk322.appdata.xml:bootstrap/org.freeciv.gtk322.appdata.xml.in - client/org.freeciv.sdl2.appdata.xml:bootstrap/org.freeciv.sdl2.appdata.xml.in - client/org.freeciv.qt.appdata.xml:bootstrap/org.freeciv.qt.appdata.xml.in - server/org.freeciv.server.appdata.xml:bootstrap/org.freeciv.server.appdata.xml.in - tools/org.freeciv.mp.gtk2.appdata.xml:bootstrap/org.freeciv.mp.gtk2.appdata.xml.in - tools/org.freeciv.mp.gtk3.appdata.xml:bootstrap/org.freeciv.mp.gtk3.appdata.xml.in - tools/org.freeciv.mp.gtk4.appdata.xml:bootstrap/org.freeciv.mp.gtk4.appdata.xml.in - tools/org.freeciv.mp.qt.appdata.xml:bootstrap/org.freeciv.mp.qt.appdata.xml.in - tools/ruledit/org.freeciv.ruledit.appdata.xml:bootstrap/org.freeciv.ruledit.appdata.xml.in]) + bootstrap/org.freeciv.gtk2.appdata.xml:bootstrap/org.freeciv.gtk2.appdata.xml.in + bootstrap/org.freeciv.gtk3.appdata.xml:bootstrap/org.freeciv.gtk3.appdata.xml.in + bootstrap/org.freeciv.gtk322.appdata.xml:bootstrap/org.freeciv.gtk322.appdata.xml.in + bootstrap/org.freeciv.sdl2.appdata.xml:bootstrap/org.freeciv.sdl2.appdata.xml.in + bootstrap/org.freeciv.qt.appdata.xml:bootstrap/org.freeciv.qt.appdata.xml.in + bootstrap/org.freeciv.server.appdata.xml:bootstrap/org.freeciv.server.appdata.xml.in + bootstrap/org.freeciv.mp.gtk2.appdata.xml:bootstrap/org.freeciv.mp.gtk2.appdata.xml.in + bootstrap/org.freeciv.mp.gtk3.appdata.xml:bootstrap/org.freeciv.mp.gtk3.appdata.xml.in + bootstrap/org.freeciv.mp.gtk4.appdata.xml:bootstrap/org.freeciv.mp.gtk4.appdata.xml.in + bootstrap/org.freeciv.mp.qt.appdata.xml:bootstrap/org.freeciv.mp.qt.appdata.xml.in + bootstrap/org.freeciv.ruledit.appdata.xml:bootstrap/org.freeciv.ruledit.appdata.xml.in]) AC_CONFIG_FILES([fcgui:bootstrap/fcgui.in], [chmod +x fcgui]) AC_CONFIG_FILES([fcser:bootstrap/fcser.in], [chmod +x fcser]) AC_CONFIG_FILES([fcruleup:bootstrap/fcruleup.in], [chmod +x fcruleup]) diff --git a/server/Makefile.am b/server/Makefile.am index f64a4dde3b..1399b0e2b7 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -190,7 +190,3 @@ endif desktopfiledir = @DESKTOPDIR@ desktopfile_DATA = \ org.freeciv.server.desktop - -appdatafiledir = @APPDATADIR@ -appdatafile_DATA = \ - org.freeciv.server.appdata.xml diff --git a/tools/Makefile.am b/tools/Makefile.am index 5358bf07a6..3c59549597 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -60,35 +60,20 @@ else desktopfiledir = @DESKTOPDIR@ desktopfile_DATA = -appdatafiledir = @APPDATADIR@ -appdatafile_DATA = - if MODINST_GTK2 -desktopfile_DATA += \ - org.freeciv.mp.gtk2.desktop -appdatafile_DATA += \ - org.freeciv.mp.gtk2.appdata.xml +desktopfile_DATA += org.freeciv.mp.gtk2.desktop endif if MODINST_GTK3 -desktopfile_DATA += \ - org.freeciv.mp.gtk3.desktop -appdatafile_DATA += \ - org.freeciv.mp.gtk3.appdata.xml +desktopfile_DATA += org.freeciv.mp.gtk3.desktop endif if MODINST_GTK4 -desktopfile_DATA += \ - org.freeciv.mp.gtk4.desktop -appdatafile_DATA += \ - org.freeciv.mp.gtk4.appdata.xml +desktopfile_DATA += org.freeciv.mp.gtk4.desktop endif if MODINST_QT -desktopfile_DATA += \ - org.freeciv.mp.qt.desktop -appdatafile_DATA += \ - org.freeciv.mp.qt.appdata.xml +desktopfile_DATA += org.freeciv.mp.qt.desktop endif endif diff --git a/tools/ruledit/Makefile.am b/tools/ruledit/Makefile.am index 8d20b1095b..5b3515c025 100644 --- a/tools/ruledit/Makefile.am +++ b/tools/ruledit/Makefile.am @@ -7,12 +7,10 @@ include $(top_srcdir)/bootstrap/Makerules.mk if MINGW REICON = $(top_builddir)/windows/rulediticon.o endif + desktopfiledir = @DESKTOPDIR@ desktopfile_DATA = org.freeciv.ruledit.desktop -appdatafiledir = @APPDATADIR@ -appdatafile_DATA = org.freeciv.ruledit.appdata.xml - bin_PROGRAMS = freeciv-ruledit AM_CPPFLAGS = \ -- 2.35.1