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