From 56c802b6f9d48858a6510ddae27d6774fa493c8a Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Thu, 7 Jun 2018 14:59:54 -0700 Subject: [PATCH] flatpak: automatically add tag to LinGui appdata Also add translation support for appdata (cherry picked from commit 1424cd47da5d2c21331da91e985a3154703e699c) --- gtk/module.defs | 2 ++ gtk/src/Makefile.am | 22 ++++++++----- gtk/src/fr.handbrake.ghb.appdata.xml.template | 31 ++++++++++--------- 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/gtk/module.defs b/gtk/module.defs index bef536d22..28b5ee38a 100644 --- a/gtk/module.defs +++ b/gtk/module.defs @@ -47,3 +47,5 @@ endif ifeq (1,$(FEATURE.flatpak)) GTK.CONFIGURE.extra += --enable-flatpak endif + +export HB.version HB.repo.date diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am index ea4d972a4..0de38559c 100644 --- a/gtk/src/Makefile.am +++ b/gtk/src/Makefile.am @@ -38,11 +38,21 @@ icons_dep = \ if GHB_FLATPAK icons += fr.handbrake.ghb.svg hb_menu = fr.handbrake.ghb.desktop -flatpak_appdata = fr.handbrake.ghb.appdata.xml else hb_menu = ghb.desktop endif +@INTLTOOL_XML_RULE@ +appdatadir = $(datarootdir)/metainfo +appdata_in_files = fr.handbrake.ghb.appdata.xml.in +appdata_DATA = $(appdata_in_files:.xml.in=.xml) +dist_appdata_DATA = $(appdata_files) + +EXTRA_DIST = \ + $(appdata_in_files) + +DISTCLEANFILES = \ + $(appdata_files) AM_CPPFLAGS = \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @@ -163,6 +173,9 @@ widget_reverse.deps: makedeps.py widget.deps: makedeps.py python2 $(srcdir)/makedeps.py +fr.handbrake.ghb.appdata.xml.in: fr.handbrake.ghb.appdata.xml.template + sed -e 's^RELEASE_TAG^^' $< > $@ + ghbcellrenderertext.$(OBJEXT): marshalers.h $(srcdir)/marshalers.h: marshalers.list @@ -185,9 +198,6 @@ uninstall-local: echo "*** $(gtk_update_icon_cache)"; \ fi rm -f $(DESTDIR)/$(datadir)/applications/$(hb_menu) - @-if test -n "$(flatpak_appdata)"; then \ - rm -f $(DESTDIR)/$(datadir)/metainfo/$(flatpak_appdata); \ - fi install-data-local: for icon in $(icons); do \ @@ -203,7 +213,3 @@ install-data-local: fi mkdir -p $(DESTDIR)/$(datadir)/applications/; \ $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu) - @-if test -n "$(flatpak_appdata)"; then \ - mkdir -p $(DESTDIR)/$(datadir)/metainfo/; \ - $(INSTALL_DATA) $(srcdir)/$(flatpak_appdata) $(DESTDIR)/$(datadir)/metainfo/$(flatpak_appdata); \ - fi diff --git a/gtk/src/fr.handbrake.ghb.appdata.xml.template b/gtk/src/fr.handbrake.ghb.appdata.xml.template index ab79a0494..5dc88d033 100644 --- a/gtk/src/fr.handbrake.ghb.appdata.xml.template +++ b/gtk/src/fr.handbrake.ghb.appdata.xml.template @@ -2,22 +2,21 @@ fr.handbrake.ghb + ghb + jstebbins.hb_AT_gmail.com fr.handbrake.ghb.desktop - CC0 + CC0-1.0 GPL-2.0+ - HandBrake - Video Transcoder + <_name>HandBrake + <_summary>Video Transcoder -

- HandBrake is a tool for converting video from nearly any format to a - selection of modern, widely supported codecs. -

-

Reasons you'll love Handbrake:

+ <_p>HandBrake is a tool for converting video from nearly any format to a selection of modern, widely supported codecs. + <_p>Reasons you'll love Handbrake:
    -
  • Convert video from nearly any format
  • -
  • Free and Open Source
  • -
  • Multi-Platform (Windows, Mac and Linux)
  • + <_li>Convert video from nearly any format + <_li>Free and Open Source + <_li>Multi-Platform (Windows, Mac and Linux)
@@ -60,15 +59,15 @@ https://handbrake.fr/img/slides/slide1_lin.jpg - Main window and settings summary + <_caption>Main window and settings summary https://handbrake.fr/img/slides/slide2_lin.jpg - Video encoder settings + <_caption>Video encoder settings https://handbrake.fr/img/slides/slide3_lin.jpg - Audio track selection and settings + <_caption>Audio track selection and settings @@ -76,5 +75,9 @@ ghb + + RELEASE_TAG + +
-- 2.40.0