summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-10-23 10:37:55 -0700
committerJohn Stebbins <[email protected]>2018-10-23 10:37:55 -0700
commit177c1e39d22515489cfe6ba2223655456eac01db (patch)
treed3e45ebad0ed42f3748fa17324db6468430f5e18 /pkg
parent3ce05cb5ad75a1b272bea1e869124fbb603d5165 (diff)
LinGui: fix packaging with out-of-tree build directory
Diffstat (limited to 'pkg')
-rw-r--r--pkg/linux/module.defs47
-rw-r--r--pkg/linux/module.rules14
2 files changed, 33 insertions, 28 deletions
diff --git a/pkg/linux/module.defs b/pkg/linux/module.defs
index 326a891c6..c3dc20524 100644
--- a/pkg/linux/module.defs
+++ b/pkg/linux/module.defs
@@ -1,3 +1,8 @@
+PKG.in.abs/ = $(abspath $(PKG.in/))/
+PKG.out.abs/ = $(abspath $(PKG.out/))/
+STAGE.out.abs/ = $(abspath $(STAGE.out/))/
+STAGE.out.src.abs/ = $(abspath $(STAGE.out.src/))/
+
PKG.deb.machine = `dpkg --print-architecture`
PKG.rpm.machine = `rpm -E "%_target_cpu"`
PKG.release = $(HB.repo.rev)
@@ -35,33 +40,33 @@ endif
###############################################################################
-PKG.cli.tar = $(PKG.out/)$(HB.name)-$(HB.version)-$(BUILD.machine)_CLI.tar.gz
+PKG.cli.tar = $(PKG.out.abs/)$(HB.name)-$(HB.version)-$(BUILD.machine)_CLI.tar.gz
-STAGE.out.cli/ = $(STAGE.out/)cli/
+STAGE.out.cli/ = $(STAGE.out.abs/)cli/
###############################################################################
PKG.rpm.basename = $(HB.name.lower)-$(PKG.rpm.hb.version)
-PKG.rpm.src.tar.bz2 = $(STAGE.out.src/)rpm/$(PKG.rpm.basename).tar.bz2
-STAGE.out.rpm.src/ = $(STAGE.out.src/)rpm/
+PKG.rpm.src.tar.bz2 = $(STAGE.out.src.abs/)rpm/$(PKG.rpm.basename).tar.bz2
+STAGE.out.rpm.src/ = $(STAGE.out.src.abs/)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.debian = $(PKG.in.abs/)linux/debian
+PKG.flatpak/ = $(PKG.in.abs/)linux/flatpak/
+PKG.cli.deb = $(PKG.out.abs/)$(HB.name)-$(HB.debversion)-Ubuntu_CLI_$(BUILD.machine).deb
+PKG.gui.deb = $(PKG.out.abs/)$(HB.name)-$(HB.debversion)-Ubuntu_GUI_$(BUILD.machine).deb
PKG.deb.basename = $(HB.name.lower)-$(HB.debversion)
PKG.src.deb.tar = $(HB.name.lower)_$(HB.debversion).tar.gz
-PKG.src.deb.stamp = $(STAGE.out.src/).debsrc.stamp
-PKG.src.deb = $(PKG.out/)$(HB.name.lower)_$(HB.debversion).deb
+PKG.src.deb.stamp = $(STAGE.out.src.abs/).debsrc.stamp
+PKG.src.deb = $(PKG.out.abs/)$(HB.name.lower)_$(HB.debversion).deb
-PKG.cli.tmp.deb = $(PKG.out/)$(HB.name.lower)-cli_$(HB.debversion)_$(PKG.deb.machine).deb
-PKG.gui.tmp.deb = $(PKG.out/)$(HB.name.lower)-gtk_$(HB.debversion)_$(PKG.deb.machine).deb
+PKG.cli.tmp.deb = $(PKG.out.abs/)$(HB.name.lower)-cli_$(HB.debversion)_$(PKG.deb.machine).deb
+PKG.gui.tmp.deb = $(PKG.out.abs/)$(HB.name.lower)-gtk_$(HB.debversion)_$(PKG.deb.machine).deb
PKG.native.rpm.stamp = $(RPM.out/).rpm.stamp
-PKG.rpm.stamp = $(PKG.out/).rpm.stamp
+PKG.rpm.stamp = $(PKG.out.abs/).rpm.stamp
-PKG.out.flatpak/ = $(PKG.out/)flatpak/
-STAGE.out.flatpak/ = $(STAGE.out/)flatpak/
+PKG.out.flatpak/ = $(PKG.out.abs/)flatpak/
+STAGE.out.flatpak/ = $(STAGE.out.abs/)flatpak/
PKG.gui.flathub.manifest = $(PKG.out.flatpak/)fr.handbrake.ghb.json
PKG.cli.flathub.manifest = $(PKG.out.flatpak/)/fr.handbrake.HandBrakeCLI.json
PKG.gui.manifest.flatpak = $(PKG.flatpak/)fr.handbrake.ghb.json
@@ -75,12 +80,12 @@ PKG.gui.flatpak = $(PKG.out.flatpak/)$(HB.name)-$(HB.version)-$(BUILD.machine).f
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
-PKG.cli.rpm = $(PKG.out/)$(HB.name.lower)-cli-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
-PKG.gui.rpm = $(PKG.out/)$(HB.name.lower)-gui-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
-RPM.out = $(STAGE.out/)rpm
-RPM.out/ = $(STAGE.out/)rpm/
-RPMROOT.out = $(PWD)/$(STAGE.out/)rpmroot
-RPMROOT.out/ = $(PWD)/$(STAGE.out/)rpmroot/
+PKG.cli.rpm = $(PKG.out.abs/)$(HB.name.lower)-cli-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
+PKG.gui.rpm = $(PKG.out.abs/)$(HB.name.lower)-gui-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
+RPM.out = $(STAGE.out.abs/)rpm
+RPM.out/ = $(RPM.out)/
+RPMROOT.out = $(STAGE.out.abs/)rpmroot
+RPMROOT.out/ = $(RPMROOT.out)/
###############################################################################
diff --git a/pkg/linux/module.rules b/pkg/linux/module.rules
index 0772fd343..b7cc55679 100644
--- a/pkg/linux/module.rules
+++ b/pkg/linux/module.rules
@@ -49,7 +49,7 @@ $(PKG.native.rpm.stamp): $(PKG.rpm.src.tar.bz2)
echo "%define version $(PKG.rpm.hb.version)" >> $(RPM.out/)SPECS/ghb.spec
cat $(GTK.src/)ghb.spec >> $(RPM.out/)SPECS/ghb.spec
$(CP.exe) $(PKG.rpm.src.tar.bz2) $(RPM.out/)SOURCES
- rpmbuild --define="_topdir $(PWD)/$(RPM.out)" --buildroot $(RPMROOT.out) -ba $(RPM.out/)SPECS/ghb.spec
+ rpmbuild --define="_topdir $(RPM.out)" --buildroot $(RPMROOT.out) -ba $(RPM.out/)SPECS/ghb.spec
$(TOUCH.exe) $(PKG.native.rpm.stamp)
$(PKG.rpm.stamp): | $(dir $(PKG.gui.rpm))
@@ -89,11 +89,11 @@ $(PKG.cli.flatpak): GNUmakefile $(PKG.src.tar.bz2)
$(PKG.gui.tmp.deb): | $(dir $(PKG.gui.tmp.deb))
$(PKG.gui.tmp.deb): GNUmakefile
-$(RM.exe) $(SRC/)debian
- ln -s $(PWD)/$(PKG.debian) $(SRC/)debian
+ ln -s $(PKG.debian) $(SRC/)debian
fakeroot $(MAKE) -C $(SRC/) -f debian/rules clean
- $(MAKE) BUILDDIR=$(PWD)/$(BUILD) CONFIGURE=configure -C $(SRC/) -f debian/rules build
- echo $(PKG.out/)
- fakeroot $(MAKE) FORCEVERSION="-- -v$(HB.debversion)" BUILDDIR=$(PWD)/$(BUILD) CONFIGURE=configure PKGDESTDIR=$(PWD)/$(PKG.out/) -C $(SRC/) -f debian/rules binary
+ $(MAKE) BUILDDIR=$(abspath $(BUILD)) CONFIGURE=configure -C $(SRC/) -f debian/rules build
+ echo $(PKG.out.abs/)
+ fakeroot $(MAKE) FORCEVERSION="-- -v$(HB.debversion)" BUILDDIR=$(abspath $(BUILD)) CONFIGURE=configure PKGDESTDIR=$(PKG.out.abs/ -C $(SRC/) -f debian/rules binary
$(PKG.gui.deb): | $(dir $(PKG.gui.deb))
@@ -118,7 +118,7 @@ $(PKG.src.deb.stamp): GNUmakefile
$(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.deb.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $(STAGE.out.src/)bionic/
$(SRC/)scripts/repo-info.sh $(SRC/) > $(STAGE.out.src/)bionic/$(PKG.deb.basename)/version.txt
$(CP.exe) -a $(SRC/)download $(STAGE.out.src/)bionic/$(PKG.deb.basename)
- cp -a $(PWD)/$(PKG.debian) $(STAGE.out.src/)bionic/$(PKG.deb.basename)
+ cp -a $(PKG.debian) $(STAGE.out.src/)bionic/$(PKG.deb.basename)
$(CP.exe) $(STAGE.out.src/)bionic/$(PKG.deb.basename)/debian/control.bionic $(STAGE.out.src/)bionic/$(PKG.deb.basename)/debian/control
$(CP.exe) $(STAGE.out.src/)bionic/$(PKG.deb.basename)/debian/rules.bionic $(STAGE.out.src/)bionic/$(PKG.deb.basename)/debian/rules
echo "$(HB.name.lower) ($(HB.debversion)-zhb-1ppa1~bionic1) bionic; urgency=low" > $(STAGE.out.src/)bionic/$(PKG.deb.basename)/debian/changelog
@@ -132,7 +132,7 @@ $(PKG.src.deb.stamp): GNUmakefile
$(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.deb.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $(STAGE.out.src/)cosmic/
$(SRC/)scripts/repo-info.sh $(SRC/) > $(STAGE.out.src/)cosmic/$(PKG.deb.basename)/version.txt
$(CP.exe) -a $(SRC/)download $(STAGE.out.src/)cosmic/$(PKG.deb.basename)
- cp -a $(PWD)/$(PKG.debian) $(STAGE.out.src/)cosmic/$(PKG.deb.basename)
+ cp -a $(PKG.debian) $(STAGE.out.src/)cosmic/$(PKG.deb.basename)
$(CP.exe) $(STAGE.out.src/)cosmic/$(PKG.deb.basename)/debian/control.cosmic $(STAGE.out.src/)cosmic/$(PKG.deb.basename)/debian/control
$(CP.exe) $(STAGE.out.src/)cosmic/$(PKG.deb.basename)/debian/rules.cosmic $(STAGE.out.src/)cosmic/$(PKG.deb.basename)/debian/rules
echo "$(HB.name.lower) ($(HB.debversion)-zhb-1ppa1~cosmic1) cosmic; urgency=low" > $(STAGE.out.src/)cosmic/$(PKG.deb.basename)/debian/changelog