summaryrefslogtreecommitdiffstats
path: root/pkg/linux/module.rules
blob: 2d5b1a223b8aa852e2dba354ada8417df67fa30e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
pkg.create.deb:: pkg.create $(PKG.gui.deb) $(PKG.cli.deb)
pkg.create.rpm:: pkg.create $(PKG.gui.rpm) $(PKG.cli.rpm)

$(PKG.gui.rpm) $(PKG.cli.rpm): | $(dir $(PKG.gui.rpm) $(PKG.cli.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.gui.deb): | $(dir $(PKG.gui.deb))
$(PKG.gui.deb):
	-rm $(SRC/)debian
	ln -s $(PWD)/$(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.version)" BUILDDIR=$(PWD)/$(BUILD) CONFIGURE=configure PKGDESTDIR=$(PWD)/$(PKG.out/) -C $(SRC/) -f debian/rules binary
	$(MV.exe) $(PKG.gui.tmp.deb) $(PKG.gui.deb)

$(PKG.cli.deb): | $(dir $(PKG.cli.deb))
$(PKG.cli.deb): $(PKG.gui.deb)
	$(MV.exe) $(PKG.cli.tmp.deb) $(PKG.cli.deb)