]> git.proxmox.com Git - pve-cluster.git/blob - Makefile
use combined dpkg packaging variable makefile fragment
[pve-cluster.git] / Makefile
1 include /usr/share/dpkg/default.mk
2
3 PACKAGE=pve-cluster
4
5 GITVERSION:=$(shell git rev-parse HEAD)
6
7 DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb
8 LIB_DEB = libpve-cluster-perl_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
9 LIB_DEB += libpve-cluster-api-perl_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
10 DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb
11
12 DEBS = $(DEB) $(DBG_DEB) $(LIB_DEB)
13
14 PERL_APIVER := `perl -MConfig -e 'print $$Config(debian_abi)//$$Config(version);'`
15
16 all: $(DEB) $(DBG_DEB)
17
18 cpgtest: cpgtest.c
19 gcc -Wall cpgtest.c $(shell pkg-config --cflags --libs libcpg libqb) -o cpgtest
20
21 .PHONY: dinstall
22 dinstall: $(DEB) $(LIB_DEB)
23 dpkg -i $^
24
25 .PHONY: deb
26 deb $(DBG_DEB) $(LIB_DEB): $(DEB)
27 $(DEB):
28 rm -f *.deb
29 rm -rf build
30 cp -a data build
31 cp -a debian build/debian
32 echo "git clone git://git.proxmox.com/git/pve-cluster.git\\ngit checkout $(GITVERSION)" > build/debian/SOURCE
33 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
34 lintian $(DEB)
35
36
37 .PHONY: upload
38 upload: $(DEBS)
39 tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye --arch $(DEB_BUILD_ARCH)
40
41 .PHONY: clean
42 clean:
43 rm -rf *~ build *.deb *.changes *.dsc *.buildinfo