diff options
author | jstebbins <[email protected]> | 2009-06-20 03:07:57 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-06-20 03:07:57 +0000 |
commit | 27b9c72a0a2d2f426c74f1dec858595dd64fc3c7 (patch) | |
tree | 05d2475134716f1f9d1a2bad3d266bdd7acb2281 /pkg/linux | |
parent | 989cb1d9fbc7faab456c317d03a9a3b8d68b00f7 (diff) |
LinGui: add RPM packaging support and modify Debian so they can co-exist
- make pkg.create.rpm will create rpm packages
- make pkg.create.deb will create debian packages
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2583 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'pkg/linux')
-rw-r--r-- | pkg/linux/debian/handbrake-gtk.dirs | 1 | ||||
-rw-r--r-- | pkg/linux/debian/handbrake-gtk.install | 1 | ||||
-rw-r--r-- | pkg/linux/module.defs | 10 | ||||
-rw-r--r-- | pkg/linux/module.rules | 25 |
4 files changed, 31 insertions, 6 deletions
diff --git a/pkg/linux/debian/handbrake-gtk.dirs b/pkg/linux/debian/handbrake-gtk.dirs index d909ef4b4..b2a3fb93f 100644 --- a/pkg/linux/debian/handbrake-gtk.dirs +++ b/pkg/linux/debian/handbrake-gtk.dirs @@ -1,5 +1,4 @@ /usr/share/icons -/usr/share/doc/ghb /usr/bin/ /usr/share/applications diff --git a/pkg/linux/debian/handbrake-gtk.install b/pkg/linux/debian/handbrake-gtk.install index 620b0db95..21f11a31e 100644 --- a/pkg/linux/debian/handbrake-gtk.install +++ b/pkg/linux/debian/handbrake-gtk.install @@ -1,5 +1,4 @@ usr/bin/ghb usr/share/applications/* -usr/share/doc/ghb/* usr/share/icons/* #DOCS# diff --git a/pkg/linux/module.defs b/pkg/linux/module.defs index 7606aed7e..1af0e0198 100644 --- a/pkg/linux/module.defs +++ b/pkg/linux/module.defs @@ -1,4 +1,5 @@ PKG.deb.machine = `dpkg --print-architecture` +PKG.rpm.machine = `rpm -E "%_build_arch"` 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 @@ -6,7 +7,16 @@ 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.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 +RPM.out/ = $(STAGE.out/)rpm/ +RPMROOT.out = $(PWD)/$(STAGE.out/)rpmroot +RPMROOT.out/ = $(PWD)/$(STAGE.out/)rpmroot/ + ############################################################################### BUILD.out += $(PKG.cli.deb) BUILD.out += $(PKG.gui.deb) +BUILD.out += $(PKG.cli.rpm) +BUILD.out += $(PKG.gui.rpm) diff --git a/pkg/linux/module.rules b/pkg/linux/module.rules index 60a4cdf52..676d7a749 100644 --- a/pkg/linux/module.rules +++ b/pkg/linux/module.rules @@ -1,15 +1,32 @@ -pkg.create:: $(PKG.cli.deb) $(PKG.gui.deb) +pkg.create.deb:: pkg.create $(PKG.gui.deb) $(PKG.cli.deb) +pkg.create.rpm:: pkg.create $(PKG.gui.rpm) $(PKG.cli.rpm) +$(PKG.rpm): | $(dir $(PKG.rpm)) +$(PKG.gui.rpm) $(PKG.cli.rpm): + -$(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 + fakeroot $(MAKE) PREFIX=$(RPMROOT.out/)usr PREFIX/=$(RPMROOT.out/)usr/ install + 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) -$(PKG.cli.deb): | $(dir $(PKG.cli.deb)) -$(PKG.gui.deb) $(PKG.cli.deb): +$(PKG.gui.deb): | $(dir $(PKG.gui.deb)) +$(PKG.gui.deb): -rm $(BUILD/)debian ln -s $(PKG.debian) $(BUILD/)debian fakeroot $(MAKE) -f debian/rules clean $(MAKE) BUILDDIR=$(BUILD) CONFIGURE=$(SRC/)configure -f debian/rules build echo $(PKG.out/) fakeroot $(MAKE) FORCEVERSION="-- -v$(HB.version)" BUILDDIR=$(BUILD) CONFIGURE=$(SRC/)configure PKGDESTDIR=$(PKG.out/) -f debian/rules binary + $(MV.exe) $(PKG.gui.tmp.deb) $(PKG.gui.deb) +$(PKG.cli.deb): $(PKG.gui.deb) $(MV.exe) $(PKG.cli.tmp.deb) $(PKG.cli.deb) - $(MV.exe) $(PKG.gui.tmp.deb) $(PKG.gui.deb) |