Skip to content

Commit

Permalink
flatpak: automatically add <release> tag to cli appdata
Browse files Browse the repository at this point in the history
  • Loading branch information
jstebbins committed Jun 7, 2018
1 parent f95aa7a commit 7f59018
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@
<binary>HandBrakeCLI</binary>
</provides>

<releases>
RELEASE_TAG
</releases>

</component>

6 changes: 5 additions & 1 deletion test/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,18 @@ 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 = $(TEST.src/)fr.handbrake.HandBrakeCLI.appdata.xml
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))
endif

###############################################################################

TEST.out += $(TEST.c.o)
TEST.out += $(TEST.exe)
ifeq (1,$(FEATURE.flatpak))
TEST.out += $(TEST.appdata)
endif

BUILD.out += $(TEST.out)
BUILD.out += $(TEST.install.exe)
Expand Down
8 changes: 8 additions & 0 deletions test/module.rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ clean: test.clean
xclean: test.xclean

test.build: $(TEST.exe)
ifeq (1,$(FEATURE.flatpak))
test.build: $(TEST.appdata)
endif

########################################
# sync with ../macosx/module.rules #
Expand All @@ -17,8 +20,13 @@ test.install-strip: | $(dir $(TEST.install.exe))
$(STRIP.exe) $(TEST.install.exe)

ifeq (1,$(FEATURE.flatpak))
$(TEST.appdata): $(TEST.appdata.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))
endif

test.install: | $(dir $(TEST.install.exe))
$(CP.exe) $(TEST.exe) $(TEST.install.exe)
ifeq (1,$(FEATURE.flatpak))
Expand Down

0 comments on commit 7f59018

Please sign in to comment.