]> git.proxmox.com Git - pve-cluster.git/blame - Makefile
buildsys: add sbuild convenience target
[pve-cluster.git] / Makefile
CommitLineData
3b615976 1include /usr/share/dpkg/default.mk
810ebdb4 2
fe000966 3PACKAGE=pve-cluster
1bc8dbc1
TL
4BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
5DSC=$(PACKAGE)_$(DEB_VERSION).dsc
fe000966 6
0d42a457 7GITVERSION:=$(shell git rev-parse HEAD)
fe000966 8
1286f6c6
TL
9DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb
10LIB_DEB = libpve-cluster-perl_$(DEB_VERSION)_all.deb
11LIB_DEB += libpve-cluster-api-perl_$(DEB_VERSION)_all.deb
12DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb
fe000966 13
49179c31 14DEBS = $(DEB) $(DBG_DEB) $(LIB_DEB)
e4be7086 15
49179c31 16all: $(DEB) $(DBG_DEB)
fe000966
DM
17
18cpgtest: 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
28dsc: $(DSC)
29$(DSC): $(BUILDDIR)
30 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
31 lintian $(DSC)
32
22c1bf56 33.PHONY: deb
49179c31 34deb $(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
39sbuild: $(DSC)
40 sbuild $(DSC)
41
1bc8dbc1
TL
42.PHONY: dinstall
43dinstall: $(DEB) $(LIB_DEB)
44 dpkg -i $^
fe000966
DM
45
46.PHONY: upload
49179c31
TL
47upload: $(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
51clean:
69b707fb 52 rm -rf $(PACKAGE)-[0-9]*/ *.deb *.dsc *.changes *.buildinfo *.build *.tar.*