From 1424cd47da5d2c21331da91e985a3154703e699c Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Thu, 7 Jun 2018 14:59:54 -0700 Subject: flatpak: automatically add tag to LinGui appdata Also add translation support for appdata --- gtk/configure.ac | 1 + gtk/module.defs | 2 ++ gtk/src/Makefile.am | 22 ++++++++++++------- gtk/src/fr.handbrake.ghb.appdata.xml.template | 31 +++++++++++++++------------ 4 files changed, 34 insertions(+), 22 deletions(-) (limited to 'gtk') diff --git a/gtk/configure.ac b/gtk/configure.ac index 3d4cd4879..54a63d488 100644 --- a/gtk/configure.ac +++ b/gtk/configure.ac @@ -121,6 +121,7 @@ esac PKG_PROG_PKG_CONFIG #PKG_CHECK_MODULES([GHB_GTK_4_0], [gtk+-4.0 >= 3.92], [HAVE_GTK_400=1], [HAVE_GTK_400=0]) +HAVE_GTK_400=0 PKG_CHECK_MODULES([GHB_GTK_3_16], [gtk+-3.0 >= 3.16], [HAVE_GTK_316=1], [HAVE_GTK_316=0]) PKG_CHECK_MODULES([GHB_GTK_3_14], [gtk+-3.0 >= 3.14], [HAVE_GTK_314=1], [HAVE_GTK_314=0]) PKG_CHECK_MODULES([GHB_GTK_3_12], [gtk+-3.0 >= 3.12], [HAVE_GTK_312=1], [HAVE_GTK_312=0]) 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 2a610361c..a7b8c7236 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"\" \ @@ -167,6 +177,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 @@ -189,9 +202,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 \ @@ -207,7 +217,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 + +
-- cgit v1.2.3