summaryrefslogtreecommitdiffstats
path: root/pkg/linux/module.rules
blob: dcc3870207d1c8803572e5bddf1709e879de7704 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pkg.create.deb:: $(PKG.gui.deb) $(PKG.cli.deb)
pkg.create.rpm:: $(PKG.gui.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/)
	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):
	-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)