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