diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/linux/flatpak/fr.handbrake.HandBrakeCLI.json | 35 | ||||
-rw-r--r-- | pkg/linux/flatpak/fr.handbrake.ghb.json | 42 | ||||
-rw-r--r-- | pkg/linux/module.defs | 15 | ||||
-rw-r--r-- | pkg/linux/module.rules | 34 | ||||
-rw-r--r-- | pkg/module.defs | 5 | ||||
-rw-r--r-- | pkg/module.rules | 10 |
6 files changed, 134 insertions, 7 deletions
diff --git a/pkg/linux/flatpak/fr.handbrake.HandBrakeCLI.json b/pkg/linux/flatpak/fr.handbrake.HandBrakeCLI.json new file mode 100644 index 000000000..c006549b7 --- /dev/null +++ b/pkg/linux/flatpak/fr.handbrake.HandBrakeCLI.json @@ -0,0 +1,35 @@ +{ + "app-id": "fr.handbrake.HandBrakeCLI", + "runtime": "org.gnome.Platform", + "runtime-version": "3.20", + "sdk": "org.gnome.Sdk", + "command": "HandBrakeCLI", + "finish-args": [ + /* Needs video */ + "--filesystem=xdg-videos", + /* Home */ + "--filesystem=home" + ], + "modules": [ + { + "name": "handbrake", + "no-autogen": true, + "config-opts": ["--flatpak", "--disable-gtk"], + "builddir": true, + "post-install": ["rm -rf /app/share"], + "sources": [ + { + "type": "archive", + "path": "handbrake.tar.bz2", + "strip-components": 1 + }, + { + "type": "archive", + "path": "download.tgz", + "strip-components": 0 + } + ] + } + ] +} + diff --git a/pkg/linux/flatpak/fr.handbrake.ghb.json b/pkg/linux/flatpak/fr.handbrake.ghb.json new file mode 100644 index 000000000..34f578350 --- /dev/null +++ b/pkg/linux/flatpak/fr.handbrake.ghb.json @@ -0,0 +1,42 @@ +{ + "app-id": "fr.handbrake.ghb", + "runtime": "org.gnome.Platform", + "runtime-version": "3.20", + "sdk": "org.gnome.Sdk", + "command": "ghb", + "finish-args": [ + /* X11 + XShm access */ + "--share=ipc", "--socket=x11", + /* Wayland access */ + "--socket=wayland", + /* Needed for dconf to work */ + "--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro", + "--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf", + /* Needs video */ + "--filesystem=xdg-videos", + /* Home */ + "--filesystem=home" + ], + "modules": [ + { + "name": "handbrake", + "no-autogen": true, + "config-opts": ["--flatpak"], + "builddir": true, + "post-install": ["rm /app/bin/HandBrakeCLI"], + "sources": [ + { + "type": "archive", + "path": "handbrake.tar.bz2", + "strip-components": 1 + }, + { + "type": "archive", + "path": "download.tgz", + "strip-components": 0 + } + ] + } + ] +} + diff --git a/pkg/linux/module.defs b/pkg/linux/module.defs index 2eea7feb9..16a1baebc 100644 --- a/pkg/linux/module.defs +++ b/pkg/linux/module.defs @@ -28,6 +28,7 @@ PKG.rpm.src.tar.bz2 = $(STAGE.out.src/)rpm/$(PKG.rpm.basename).tar.bz2 STAGE.out.rpm.src/ = $(STAGE.out.src/)rpm/ PKG.debian = $(PKG.in/)linux/debian +PKG.flatpak/ = $(PKG.in/)linux/flatpak/ PKG.cli.deb = $(PKG.out/)$(HB.name)-$(HB.debversion)-Ubuntu_CLI_$(BUILD.machine).deb PKG.gui.deb = $(PKG.out/)$(HB.name)-$(HB.debversion)-Ubuntu_GUI_$(BUILD.machine).deb PKG.deb.basename = $(HB.name.lower)-$(HB.debversion) @@ -41,6 +42,18 @@ PKG.gui.tmp.deb = $(PKG.out/)$(HB.name.lower)-gtk_$(HB.debversion)_$(PKG.deb.mac PKG.native.rpm.stamp = $(RPM.out/).rpm.stamp PKG.rpm.stamp = $(PKG.out/).rpm.stamp +PKG.out.flatpak/ = $(PKG.out/)flatpak/ +STAGE.out.flatpak/ = $(STAGE.out/)flatpak/ +PKG.src.flatpak = $(STAGE.out.flatpak/)handbrake.tar.bz2 +PKG.contrib.flatpak = $(STAGE.out.flatpak/)download.tgz +PKG.gui.manifest.flatpak = $(PKG.flatpak/)fr.handbrake.ghb.json +PKG.cli.manifest.flatpak = $(PKG.flatpak/)fr.handbrake.HandBrakeCLI.json +PKG.gui.build.flatpak = $(STAGE.out.flatpak/)$(HB.name)-Flatpak_GUI_$(BUILD.machine).build +PKG.cli.build.flatpak = $(STAGE.out.flatpak/)$(HB.name)-Flatpak_CLI_$(BUILD.machine).build +PKG.repo.flatpak = $(PKG.out.flatpak/)$(HB.name)-Flatpak.repo +PKG.cli.flatpak = $(PKG.out.flatpak/)$(HB.name)-$(HB.version)-Flatpak_CLI_$(BUILD.machine).flatpak +PKG.gui.flatpak = $(PKG.out.flatpak/)$(HB.name)-$(HB.version)-Flatpak_GUI_$(BUILD.machine).flatpak + PKG.gui.native.rpm = $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name.lower)-gui-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm PKG.cli.native.rpm = $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name.lower)-cli-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm @@ -54,6 +67,8 @@ RPMROOT.out/ = $(PWD)/$(STAGE.out/)rpmroot/ ############################################################################### BUILD.out += $(PKG.src.tar) +BUILD.out += $(PKG.cli.flatpak) +BUILD.out += $(PKG.gui.flatpak) BUILD.out += $(PKG.cli.deb) BUILD.out += $(PKG.gui.deb) BUILD.out += $(PKG.cli.rpm) diff --git a/pkg/linux/module.rules b/pkg/linux/module.rules index 7054dee6e..e43906a9a 100644 --- a/pkg/linux/module.rules +++ b/pkg/linux/module.rules @@ -1,3 +1,4 @@ +pkg.create.flatpak:: $(PKG.gui.flatpak) $(PKG.cli.flatpak) pkg.create.deb:: $(PKG.gui.deb) $(PKG.cli.deb) pkg.create.rpm:: $(PKG.rpm.stamp) pkg.create.src.deb:: $(PKG.src.deb.stamp) @@ -56,6 +57,38 @@ $(PKG.rpm.stamp): $(PKG.native.rpm.stamp) $(TOUCH.exe) $(PKG.rpm.stamp) # +# Flatpak binary package rules +# +$(PKG.src.flatpak): $(PKG.src.tar.bz2) + $(MKDIR.exe) -p $(STAGE.out.flatpak/) + -$(RM.exe) -rf $(STAGE.out.flatpak/).flatpak-builder + $(CP.exe) $(PKG.src.tar.bz2) $(PKG.src.flatpak) + +$(PKG.contrib.flatpak): + $(MKDIR.exe) -p $(STAGE.out.flatpak/) + $(TAR.exe) -C $(SRC/) -czf $(PWD)/$(PKG.contrib.flatpak) download + +$(PKG.gui.flatpak): GNUmakefile $(PKG.src.flatpak) $(PKG.contrib.flatpak) + make contrib.fetch + $(MKDIR.exe) -p $(PKG.out.flatpak/) + # Relative paths in the manifest are relative to the location + # of the manifest. So put it where we have staged the files that + # it needs. + $(CP.exe) $(PKG.gui.manifest.flatpak) $(STAGE.out.flatpak/)fr.handbrake.gui.json + flatpak-builder --force-clean --gpg-sign=608AD8F6 --repo=$(PKG.repo.flatpak) $(PKG.gui.build.flatpak) $(STAGE.out.flatpak/)fr.handbrake.gui.json + flatpak build-bundle $(PKG.repo.flatpak) $(PKG.gui.flatpak) fr.handbrake.ghb + +$(PKG.cli.flatpak): GNUmakefile $(PKG.src.flatpak) $(PKG.contrib.flatpak) + make contrib.fetch + $(MKDIR.exe) -p $(PKG.out.flatpak/) + # Relative paths in the manifest are relative to the location + # of the manifest. So put it where we have staged the files that + # it needs. + $(CP.exe) $(PKG.cli.manifest.flatpak) $(STAGE.out.flatpak/)fr.handbrake.HandBrakeCLI.json + flatpak-builder --force-clean --gpg-sign=608AD8F6 --repo=$(PKG.repo.flatpak) $(PKG.cli.build.flatpak) $(STAGE.out.flatpak/)fr.handbrake.HandBrakeCLI.json + flatpak build-bundle $(PKG.repo.flatpak) $(PKG.cli.flatpak) fr.handbrake.HandBrakeCLI + +# # Debian binary package rules # $(PKG.gui.tmp.deb): | $(dir $(PKG.gui.tmp.deb)) @@ -67,6 +100,7 @@ $(PKG.gui.tmp.deb): GNUmakefile echo $(PKG.out/) fakeroot $(MAKE) FORCEVERSION="-- -v$(HB.debversion)" BUILDDIR=$(PWD)/$(BUILD) CONFIGURE=configure PKGDESTDIR=$(PWD)/$(PKG.out/) -C $(SRC/) -f debian/rules binary + $(PKG.gui.deb): | $(dir $(PKG.gui.deb)) $(PKG.gui.deb): $(PKG.gui.tmp.deb) $(MV.exe) $(PKG.gui.tmp.deb) $(PKG.gui.deb) diff --git a/pkg/module.defs b/pkg/module.defs index 67e2b14a3..9ab47ac0c 100644 --- a/pkg/module.defs +++ b/pkg/module.defs @@ -7,8 +7,9 @@ PKG.basename = $(HB.name)-$(HB.version) PKG.src.tar.bz2 = $(PKG.out/)$(PKG.basename)-source.tar.bz2 PKG.src-contrib.tar.bz2 = $(PKG.out/)$(PKG.basename)-contrib.tar.bz2 -STAGE.out/ = $(BUILD/)stage/ -STAGE.out.src/ = $(STAGE.out/)src/ +STAGE.out/ = $(BUILD/)stage/ +STAGE.out.src/ = $(STAGE.out/)src/ +STAGE.out.src.dist/ = $(STAGE.out.src/)$(PKG.basename) ############################################################################### diff --git a/pkg/module.rules b/pkg/module.rules index 5ec109fd3..8bb7a81e5 100644 --- a/pkg/module.rules +++ b/pkg/module.rules @@ -13,13 +13,13 @@ pkg.clean: $(RM.exe) -fr $(PKG.out/) $(PKG.src.tar.bz2): | $(dir $(PKG.src.tar.bz2)) -$(PKG.src.tar.bz2): | $(STAGE.out.src/) +$(PKG.src.tar.bz2): $(STAGE.out.src.dist/) $(TAR.exe) cjf $@ -C $(STAGE.out.src/) $(PKG.basename) -$(STAGE.out.src/): - $(MKDIR.exe) -p $@ - $(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $@ - $(SRC/)scripts/repo-info.sh $(SRC/) $(GIT.exe) > $@/$(PKG.basename)/version.txt +$(STAGE.out.src.dist/): + $(MKDIR.exe) -p $(STAGE.out.src/) + $(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $(STAGE.out.src/) + $(SRC/)scripts/repo-info.sh $(SRC/) $(GIT.exe) > $@/version.txt $(PKG.src-contrib.tar.bz2): $(TAR.exe) cjf $@ -C $(CONTRIB.download/) \ |