]>
Commit | Line | Data |
---|---|---|
3b615976 | 1 | include /usr/share/dpkg/default.mk |
810ebdb4 | 2 | |
fe000966 | 3 | PACKAGE=pve-cluster |
1bc8dbc1 TL |
4 | BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION) |
5 | DSC=$(PACKAGE)_$(DEB_VERSION).dsc | |
fe000966 | 6 | |
0d42a457 | 7 | GITVERSION:=$(shell git rev-parse HEAD) |
fe000966 | 8 | |
1286f6c6 TL |
9 | DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb |
10 | LIB_DEB = libpve-cluster-perl_$(DEB_VERSION)_all.deb | |
11 | LIB_DEB += libpve-cluster-api-perl_$(DEB_VERSION)_all.deb | |
12 | DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb | |
fe000966 | 13 | |
49179c31 | 14 | DEBS = $(DEB) $(DBG_DEB) $(LIB_DEB) |
e4be7086 | 15 | |
49179c31 | 16 | all: $(DEB) $(DBG_DEB) |
fe000966 DM |
17 | |
18 | cpgtest: cpgtest.c | |
a8bf13d0 | 19 | gcc -Wall cpgtest.c $(shell pkg-config --cflags --libs libcpg libqb) -o cpgtest |
fe000966 | 20 | |
1bc8dbc1 TL |
21 | $(BUILDDIR): |
22 | rm -rf $@ $@.tmp | |
23 | cp -a data $@.tmp | |
24 | cp -a debian $@.tmp/ | |
25 | echo "git clone git://git.proxmox.com/git/pve-cluster.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE | |
26 | mv $@.tmp $@ | |
fe000966 | 27 | |
69b707fb TL |
28 | dsc: $(DSC) |
29 | $(DSC): $(BUILDDIR) | |
30 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d | |
31 | lintian $(DSC) | |
32 | ||
22c1bf56 | 33 | .PHONY: deb |
49179c31 | 34 | deb $(DBG_DEB) $(LIB_DEB): $(DEB) |
1bc8dbc1 TL |
35 | $(DEB): $(BUILDDIR) |
36 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc | |
49179c31 | 37 | lintian $(DEB) |
fe000966 | 38 | |
3ce80eea TL |
39 | sbuild: $(DSC) |
40 | sbuild $(DSC) | |
41 | ||
1bc8dbc1 TL |
42 | .PHONY: dinstall |
43 | dinstall: $(DEB) $(LIB_DEB) | |
44 | dpkg -i $^ | |
fe000966 DM |
45 | |
46 | .PHONY: upload | |
49179c31 TL |
47 | upload: $(DEBS) |
48 | tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye --arch $(DEB_BUILD_ARCH) | |
fe000966 DM |
49 | |
50 | .PHONY: clean | |
51 | clean: | |
69b707fb | 52 | rm -rf $(PACKAGE)-[0-9]*/ *.deb *.dsc *.changes *.buildinfo *.build *.tar.* |