summaryrefslogtreecommitdiffstats
path: root/pkg/linux
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-04-12 18:01:01 +0000
committerjstebbins <[email protected]>2010-04-12 18:01:01 +0000
commit788762ec1d905d4783a62de27863ec8ebf66d284 (patch)
tree4fd54d66f2aa539677971ead01188bc52b31d73c /pkg/linux
parent1a466338ea91528105f73681f85238be96670b2a (diff)
LinGui: improved rpm building
Resulting rpms have fewer warnings and no errors according to rpmlint. No need to pre-build binaries. Just configure and "make pkg.create.rpm" Standard fedora rpms can be found in: build/stage/rpm/RPMS and SRPMS Binary packages are renamed according to handbrake naming convention in: build/pkg git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3220 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'pkg/linux')
-rw-r--r--pkg/linux/module.defs11
-rw-r--r--pkg/linux/module.rules35
2 files changed, 36 insertions, 10 deletions
diff --git a/pkg/linux/module.defs b/pkg/linux/module.defs
index 8b91f2d3d..93d686ced 100644
--- a/pkg/linux/module.defs
+++ b/pkg/linux/module.defs
@@ -1,5 +1,11 @@
PKG.deb.machine = `dpkg --print-architecture`
PKG.rpm.machine = `rpm -E "%_target_cpu"`
+PKG.release = 1
+PKG.rpm.dist = `rpm -E "%dist"`
+
+PKG.rpm.src.tar.bz2 = $(STAGE.out.src/)rpm/$(PKG.basename).tar.bz2
+STAGE.out.rpm.src/ = $(STAGE.out.src/)rpm/
+
PKG.debian = $(PKG.in/)linux/debian
PKG.cli.deb = $(PKG.out/)$(HB.name)-$(HB.version)-Ubuntu_CLI_$(BUILD.machine).deb
PKG.gui.deb = $(PKG.out/)$(HB.name)-$(HB.version)-Ubuntu_GUI_$(BUILD.machine).deb
@@ -7,6 +13,11 @@ PKG.gui.deb = $(PKG.out/)$(HB.name)-$(HB.version)-Ubuntu_GUI_$(BUILD.machine).de
PKG.cli.tmp.deb = $(PKG.out/)handbrake-cli_$(HB.version)_$(PKG.deb.machine).deb
PKG.gui.tmp.deb = $(PKG.out/)handbrake-gtk_$(HB.version)_$(PKG.deb.machine).deb
+PKG.native.rpm.stamp = $(RPM.out/).rpm.stamp
+
+PKG.gui.native.rpm = $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name)-gui-$(HB.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
+PKG.cli.native.rpm = $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name)-cli-$(HB.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
+
PKG.cli.rpm = $(PKG.out/)$(HB.name)-$(HB.version)-Fedora_CLI_$(BUILD.machine).rpm
PKG.gui.rpm = $(PKG.out/)$(HB.name)-$(HB.version)-Fedora_GUI_$(BUILD.machine).rpm
RPM.out = $(STAGE.out/)rpm
diff --git a/pkg/linux/module.rules b/pkg/linux/module.rules
index c3346be5b..dcc387020 100644
--- a/pkg/linux/module.rules
+++ b/pkg/linux/module.rules
@@ -1,20 +1,35 @@
-pkg.create.deb:: pkg.create $(PKG.gui.deb) $(PKG.cli.deb)
-pkg.create.rpm:: pkg.create $(PKG.gui.rpm) $(PKG.cli.rpm)
+pkg.create.deb:: $(PKG.gui.deb) $(PKG.cli.deb)
+pkg.create.rpm:: $(PKG.gui.rpm)
-$(PKG.gui.rpm) $(PKG.cli.rpm): | $(dir $(PKG.gui.rpm) $(PKG.cli.rpm))
-$(PKG.gui.rpm) $(PKG.cli.rpm):
+$(PKG.rpm.src.tar.bz2): | $(STAGE.out.rpm.src/)
+ $(TAR.exe) cjf $@ -C $(STAGE.out.rpm.src/) $(PKG.basename)
+
+$(STAGE.out.rpm.src/):
+# -$(MKDIR.exe) -p $(STAGE.out.rpm.src/)$(PKG.basename)
+# tar c --exclude build ../* | tar x -C $(STAGE.out.rpm.src/)$(PKG.basename)
+ svn co -r$(HB.repo.rev) $(HB.repo.url) $@/$(PKG.basename)
+ -$(MKDIR.exe) $(STAGE.out.rpm.src/)$(PKG.basename)/download
+ $(CP.exe) $(SRC/)download/*.tar.* $(STAGE.out.rpm.src/)$(PKG.basename)/download
+
+$(PKG.native.rpm.stamp): $(PKG.rpm.src.tar.bz2)
-$(MKDIR.exe) -p $(RPM.out/)SOURCES
-$(MKDIR.exe) -p $(RPM.out/)SPECS
-$(MKDIR.exe) -p $(RPM.out/)BUILD
-$(MKDIR.exe) -p $(RPM.out/)RPMS
-$(MKDIR.exe) -p $(RPM.out/)SRPMS
-$(MKDIR.exe) -p $(RPMROOT.out/)
- $(CP.exe) $(GTK.src/)ghb.spec $(RPM.out/)SPECS
- $(CP.exe) $(PKG.src.tar.bz2) $(RPM.out/)SOURCES
- $(TAR.exe) -xf $(PKG.src.tar.bz2) -C $(RPM.out/)BUILD
- rpmbuild --define="version $(HB.version)" --define="_topdir $(PWD)/$(RPM.out)" --buildroot $(RPMROOT.out) -ba $(GTK.src/)ghb.spec
- $(CP.exe) $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name)-cli-$(HB.version)*.rpm $(PKG.cli.rpm)
- $(CP.exe) $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name)-gui-$(HB.version)*.rpm $(PKG.gui.rpm)
+ echo "%define name $(HB.name)" > $(RPM.out/)SPECS/ghb.spec
+ echo "%define release 1" >> $(RPM.out/)SPECS/ghb.spec
+ echo "%define version $(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
+ $(TOUCH.exe) $(PKG.native.rpm.stamp)
+
+$(PKG.gui.rpm): | $(dir $(PKG.gui.rpm))
+$(PKG.gui.rpm): $(PKG.native.rpm.stamp)
+ $(CP.exe) $(PKG.gui.native.rpm) $(PKG.gui.rpm)
+ $(CP.exe) $(PKG.cli.native.rpm) $(PKG.cli.rpm)
$(PKG.gui.deb): | $(dir $(PKG.gui.deb))
$(PKG.gui.deb):