-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
54 lines (41 loc) · 1.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
include /usr/share/dpkg/default.mk
PACKAGE=pve-cluster
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
DSC=$(PACKAGE)_$(DEB_VERSION).dsc
GITVERSION:=$(shell git rev-parse HEAD)
DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb
LIB_DEB = libpve-cluster-perl_$(DEB_VERSION)_all.deb
LIB_DEB += libpve-cluster-api-perl_$(DEB_VERSION)_all.deb
LIB_DEB += libpve-notify-perl_$(DEB_VERSION)_all.deb
DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb
DEBS = $(DEB) $(DBG_DEB) $(LIB_DEB)
all: $(DEB) $(DBG_DEB)
$(BUILDDIR):
rm -rf $@ $@.tmp
cp -a src $@.tmp
cp -a debian $@.tmp/
echo "git clone git://git.proxmox.com/git/pve-cluster.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
mv $@.tmp $@
dsc:
rm -rf $(BUILDDIR) $(DSC)
$(MAKE) $(DSC)
lintian $(DSC)
$(DSC): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
.PHONY: deb
deb $(DBG_DEB) $(LIB_DEB): $(DEB)
$(DEB): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
lintian $(DEB)
sbuild: $(DSC)
sbuild $(DSC)
.PHONY: dinstall
dinstall: $(DEB) $(LIB_DEB)
dpkg -i $^
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEBS)
tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_BUILD_ARCH)
.PHONY: clean
clean:
rm -rf $(PACKAGE)-[0-9]*/ *.deb *.dsc *.changes *.buildinfo *.build *.tar.*