summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2020-05-08 08:24:06 -0600
committerJohn Stebbins <[email protected]>2020-05-08 10:29:49 -0600
commitfcd8b83d0a150bff94de72f366039a97d466c72d (patch)
tree854a5f1b72364f26f0d539efb39a304399754523
parent17b21420b27b3d86d1991f951b150030dfb3b75b (diff)
flatpak: conform to freedesktop metainfo standards
(cherry picked from commit 368576dc9aa94c792a309e227c9a893776d8cdd1)
-rw-r--r--gtk/src/Makefile.am16
-rw-r--r--gtk/src/fr.handbrake.ghb.metainfo.template.xml (renamed from gtk/src/fr.handbrake.ghb.appdata.template.xml)0
-rw-r--r--pkg/linux/flatpak/fr.handbrake.ghb.Plugin.IntelMediaSDK.json (renamed from pkg/linux/flatpak/fr.handbrake.plugin.IntelMediaSDK.json)26
-rw-r--r--pkg/linux/flatpak/fr.handbrake.ghb.Plugin.IntelMediaSDK.metainfo.xml18
-rw-r--r--pkg/linux/flatpak/fr.handbrake.ghb.json2
-rw-r--r--pkg/linux/module.defs3
-rw-r--r--pkg/linux/module.rules1
-rw-r--r--test/fr.handbrake.HandBrakeCLI.metainfo.xml.template (renamed from test/fr.handbrake.HandBrakeCLI.appdata.xml.template)0
-rw-r--r--test/module.defs10
-rw-r--r--test/module.rules10
10 files changed, 57 insertions, 29 deletions
diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am
index 68504bae6..147df424e 100644
--- a/gtk/src/Makefile.am
+++ b/gtk/src/Makefile.am
@@ -39,16 +39,16 @@ icons_dep = \
hb_menu = fr.handbrake.ghb.desktop
-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)
+metainfodir = $(datarootdir)/metainfo
+metainfo_in_files = fr.handbrake.ghb.metainfo.xml.in
+metainfo_DATA = $(metainfo_in_files:.xml.in=.xml)
+dist_metainfo_DATA = $(metainfo_files)
EXTRA_DIST = \
- $(appdata_in_files)
+ $(metainfo_in_files)
DISTCLEANFILES = \
- $(appdata_files)
+ $(metainfo_files)
AM_CPPFLAGS = \
-DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \
@@ -172,10 +172,10 @@ widget_reverse.deps: makedeps.py
widget.deps: makedeps.py
$(HB_PYTHON) $(srcdir)/makedeps.py
-fr.handbrake.ghb.appdata.xml: fr.handbrake.ghb.appdata.xml.in
+fr.handbrake.ghb.metainfo.xml: fr.handbrake.ghb.metainfo.xml.in
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
-fr.handbrake.ghb.appdata.xml.in: fr.handbrake.ghb.appdata.template.xml
+fr.handbrake.ghb.metainfo.xml.in: fr.handbrake.ghb.metainfo.template.xml
sed -e 's^RELEASE_TAG^<release version="$(HB.version)" date="$(word 1,$(HB.repo.date))" />^' $< > $@
$(srcdir)/marshalers.h: marshalers.list
diff --git a/gtk/src/fr.handbrake.ghb.appdata.template.xml b/gtk/src/fr.handbrake.ghb.metainfo.template.xml
index 4e8ae6760..4e8ae6760 100644
--- a/gtk/src/fr.handbrake.ghb.appdata.template.xml
+++ b/gtk/src/fr.handbrake.ghb.metainfo.template.xml
diff --git a/pkg/linux/flatpak/fr.handbrake.plugin.IntelMediaSDK.json b/pkg/linux/flatpak/fr.handbrake.ghb.Plugin.IntelMediaSDK.json
index d149f3b3e..bec534499 100644
--- a/pkg/linux/flatpak/fr.handbrake.plugin.IntelMediaSDK.json
+++ b/pkg/linux/flatpak/fr.handbrake.ghb.Plugin.IntelMediaSDK.json
@@ -1,5 +1,5 @@
{
- "app-id": "fr.handbrake.plugin.IntelMediaSDK",
+ "app-id": "fr.handbrake.ghb.Plugin.IntelMediaSDK",
"branch": "1",
"runtime": "fr.handbrake.ghb",
"runtime-version": "development",
@@ -84,13 +84,6 @@
},
{
"name": "mediasdk",
- "sources": [
- {
- "type": "archive",
- "url": "https://github.com/Intel-Media-SDK/MediaSDK/archive/intel-mediasdk-20.1.1.tar.gz",
- "sha256": "44300c0f068f6d018d182455dd9c2f48db1e85fe0b38fcd60d0353bd145923dc"
- }
- ],
"buildsystem": "cmake",
"builddir": true,
"config-opts": [
@@ -104,7 +97,22 @@
"build-options": {
"prefix" : "/app/extensions/IntelMediaSDK",
"prepend-pkg-config-path": "/app/extensions/IntelMediaSDK/lib/pkgconfig"
- }
+ },
+ "post-install": [
+ "install -Dp -m 644 ${FLATPAK_BUILDER_BUILDDIR}/fr.handbrake.ghb.Plugin.IntelMediaSDK.metainfo.xml --target-directory=${FLATPAK_DEST}/share/metainfo",
+ "appstream-compose --basename=fr.handbrake.ghb.Plugin.IntelMediaSDK --prefix=${FLATPAK_DEST} --origin=flatpak fr.handbrake.ghb.Plugin.IntelMediaSDK"
+ ],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://github.com/Intel-Media-SDK/MediaSDK/archive/intel-mediasdk-20.1.1.tar.gz",
+ "sha256": "44300c0f068f6d018d182455dd9c2f48db1e85fe0b38fcd60d0353bd145923dc"
+ },
+ {
+ "type": "file",
+ "path": "fr.handbrake.ghb.Plugin.IntelMediaSDK.metainfo.xml"
+ }
+ ]
}
]
}
diff --git a/pkg/linux/flatpak/fr.handbrake.ghb.Plugin.IntelMediaSDK.metainfo.xml b/pkg/linux/flatpak/fr.handbrake.ghb.Plugin.IntelMediaSDK.metainfo.xml
new file mode 100644
index 000000000..45fe2b3a0
--- /dev/null
+++ b/pkg/linux/flatpak/fr.handbrake.ghb.Plugin.IntelMediaSDK.metainfo.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="addon">
+ <id>fr.handbrake.ghb.Plugin.IntelMediaSDK</id>
+ <extends>fr.handbrake.ghb</extends>
+ <name>IntelMediaSDK plugin for HandBrake</name>
+ <summary>Provides Intel QSV encoding options.</summary>
+ <description>
+ <p>
+ QSV uses dedicated media processing features embedded in Intel graphics
+ hardware to accelerate encoding of video. Encoder codecs supported
+ by HandBrake are h.264 (8 bit) and h.265 (8 and 10 bit).
+ </p>
+</description>
+ <url type="homepage">https://github.com/Intel-Media-SDK/MediaSDK</url>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>MIT</project_license>
+ <developer_name>Intel</developer_name>
+</component>
diff --git a/pkg/linux/flatpak/fr.handbrake.ghb.json b/pkg/linux/flatpak/fr.handbrake.ghb.json
index d7ddfbc21..aaa1b4abc 100644
--- a/pkg/linux/flatpak/fr.handbrake.ghb.json
+++ b/pkg/linux/flatpak/fr.handbrake.ghb.json
@@ -21,7 +21,7 @@
"--env=GIO_EXTRA_MODULES=/app/lib/gio/modules"
],
"add-extensions": {
- "fr.handbrake.plugin": {
+ "fr.handbrake.ghb.Plugin": {
"version": "1",
"directory": "extensions",
"add-ld-path": "lib",
diff --git a/pkg/linux/module.defs b/pkg/linux/module.defs
index 307523058..caf618252 100644
--- a/pkg/linux/module.defs
+++ b/pkg/linux/module.defs
@@ -99,8 +99,9 @@ PKG.cli.manifest.flatpak = $(STAGE.out.flatpak/)$(PKG.cli.name.flatpak).json
PKG.cli.build.flatpak = $(STAGE.out.flatpak/)$(PKG.cli.name.flatpak)-$(HB.version)-$(HOST.machine).build
PKG.cli.flatpak = $(PKG.out.flatpak/)$(PKG.cli.name.flatpak)-$(HB.version)-$(HOST.machine).flatpak
-PKG.mediasdk.name.flatpak = fr.handbrake.plugin.IntelMediaSDK
+PKG.mediasdk.name.flatpak = fr.handbrake.ghb.Plugin.IntelMediaSDK
PKG.mediasdk.manifest.flathub = $(PKG.out.flatpak/)$(PKG.mediasdk.name.flatpak).json
+PKG.mediasdk.metainfo.flatpak = $(PKG.flatpak/)$(PKG.mediasdk.name.flatpak).metainfo.xml
PKG.mediasdk.template.flatpak = $(PKG.flatpak/)$(PKG.mediasdk.name.flatpak).json
PKG.mediasdk.manifest.flatpak = $(STAGE.out.flatpak/)$(PKG.mediasdk.name.flatpak).json
PKG.mediasdk.build.flatpak = $(STAGE.out.flatpak/)$(PKG.mediasdk.name.flatpak)-$(HB.version)-$(HOST.machine).build
diff --git a/pkg/linux/module.rules b/pkg/linux/module.rules
index 8321f821c..3d117e173 100644
--- a/pkg/linux/module.rules
+++ b/pkg/linux/module.rules
@@ -91,6 +91,7 @@ $(PKG.mediasdk.flatpak): GNUmakefile $(PKG.mediasdk.template.flatpak) $(PKG.gui.
$(SRC/)scripts/create_flatpak_manifest.py -p -r $(PKG.branch.flatpak) -t $(PKG.mediasdk.template.flatpak) $(PKG.mediasdk.manifest.flatpak)
-flatpak --user remove --noninteractive $(PKG.gui.name.flatpak)//$(PKG.branch.flatpak)
flatpak --user install --noninteractive $(PKG.gui.flatpak)
+ $(CP.exe) $(PKG.mediasdk.metainfo.flatpak) $(STAGE.out.flatpak/)
flatpak-builder --default-branch=$(PKG.branch.flatpak) --disable-cache --force-clean $(PGPSIGN) --repo=$(PKG.repo.flatpak) $(PKG.mediasdk.build.flatpak) $(PKG.mediasdk.manifest.flatpak)
# flatpak-builder --run $(PKG.mediasdk.build.flatpak) $(PKG.mediasdk.manifest.flatpak) bash
flatpak build-bundle --runtime $(PKG.repo.flatpak) $(PKG.mediasdk.flatpak) $(PKG.mediasdk.name.flatpak) $(PKG.plugin.version.flatpak)
diff --git a/test/fr.handbrake.HandBrakeCLI.appdata.xml.template b/test/fr.handbrake.HandBrakeCLI.metainfo.xml.template
index cd9e7609f..cd9e7609f 100644
--- a/test/fr.handbrake.HandBrakeCLI.appdata.xml.template
+++ b/test/fr.handbrake.HandBrakeCLI.metainfo.xml.template
diff --git a/test/module.defs b/test/module.defs
index ffc00a8b2..24ec709d7 100644
--- a/test/module.defs
+++ b/test/module.defs
@@ -38,9 +38,9 @@ TEST.GCC.l += $(foreach m,$(MODULES.NAMES),$($m.OSL.libs))
TEST.install.exe = $(DESTDIR)$(PREFIX/)bin/$(notdir $(TEST.exe))
ifeq (1,$(FEATURE.flatpak))
- TEST.appdata.template = $(TEST.src/)fr.handbrake.HandBrakeCLI.appdata.xml.template
- TEST.appdata = $(TEST.build/)fr.handbrake.HandBrakeCLI.appdata.xml
- TEST.install.appdata = $(DESTDIR)$(PREFIX/)share/metainfo/$(notdir $(TEST.appdata))
+ TEST.metainfo.template = $(TEST.src/)fr.handbrake.HandBrakeCLI.metainfo.xml.template
+ TEST.metainfo = $(TEST.build/)fr.handbrake.HandBrakeCLI.metainfo.xml
+ TEST.install.metainfo = $(DESTDIR)$(PREFIX/)share/metainfo/$(notdir $(TEST.metainfo))
endif
###############################################################################
@@ -48,13 +48,13 @@ endif
TEST.out += $(TEST.c.o)
TEST.out += $(TEST.exe)
ifeq (1,$(FEATURE.flatpak))
- TEST.out += $(TEST.appdata)
+ TEST.out += $(TEST.metainfo)
endif
BUILD.out += $(TEST.out)
BUILD.out += $(TEST.install.exe)
ifeq (1,$(FEATURE.flatpak))
- BUILD.out += $(TEST.install.appdata)
+ BUILD.out += $(TEST.install.metainfo)
endif
###############################################################################
diff --git a/test/module.rules b/test/module.rules
index 16e2e1c4d..26a2e4e33 100644
--- a/test/module.rules
+++ b/test/module.rules
@@ -9,7 +9,7 @@ xclean: test.xclean
test.build: $(TEST.exe)
ifeq (1,$(FEATURE.flatpak))
-test.build: $(TEST.appdata)
+test.build: $(TEST.metainfo)
endif
########################################
@@ -20,17 +20,17 @@ test.install-strip: | $(dir $(TEST.install.exe))
$(STRIP.exe) $(TEST.install.exe)
ifeq (1,$(FEATURE.flatpak))
-$(TEST.appdata): $(TEST.appdata.template)
+$(TEST.metainfo): $(TEST.metainfo.template)
sed -e 's^RELEASE_TAG^<release version="$(HB.version)" date="$(word 1,$(HB.repo.date))" />^' $< > $@
-$(TEST.install.appdata): $(TEST.appdata)
-test.install: | $(dir $(TEST.install.appdata))
+$(TEST.install.metainfo): $(TEST.metainfo)
+test.install: | $(dir $(TEST.install.metainfo))
endif
test.install: | $(dir $(TEST.install.exe))
$(CP.exe) $(TEST.exe) $(TEST.install.exe)
ifeq (1,$(FEATURE.flatpak))
- $(CP.exe) $(TEST.appdata) $(TEST.install.appdata)
+ $(CP.exe) $(TEST.metainfo) $(TEST.install.metainfo)
endif
test.uninstall: