]> git.proxmox.com Git - pve-qemu.git/blame - Makefile
buildsys: cleanup also older .deb files from prev. builds
[pve-qemu.git] / Makefile
CommitLineData
06299321
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
95259824 3
06299321 4PACKAGE = pve-qemu-kvm
95259824
WB
5
6SRCDIR := qemu
06299321 7BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
95259824 8
d2494dd2 9GITVERSION := $(shell git rev-parse HEAD)
95259824 10
06299321
TL
11DEB = ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
12DEB_DBG = ${PACKAGE}-dbg_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
95259824
WB
13DEBS = $(DEB) $(DEB_DBG)
14
95259824
WB
15all: $(DEBS)
16
17.PHONY: submodule
18submodule:
19 test -f "${SRCDIR}/debian/changelog" || git submodule update --init
20
06299321
TL
21$(BUILDDIR): keycodemapdb | submodule
22 rm -rf $(BUILDDIR)
23 cp -a $(SRCDIR) $(BUILDDIR)
24 cp -a debian $(BUILDDIR)/debian
25 rm -rf $(BUILDDIR)/ui/keycodemapdb
26 cp -a keycodemapdb $(BUILDDIR)/ui/
27 echo "git clone git://git.proxmox.com/git/pve-qemu.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
28 # set package version
29 sed -i 's/^pkgversion="".*/pkgversion="${PACKAGE}_${KVMVER}-${KVMPKGREL}"/' $(BUILDDIR)/configure
30
95259824
WB
31.PHONY: deb kvm
32deb kvm: $(DEBS)
33$(DEB_DBG): $(DEB)
06299321
TL
34$(DEB): $(BUILDDIR)
35 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc -j
36 lintian $(DEBS)
95259824 37
6838f038
WB
38.PHONY: update
39update:
06299321
TL
40 cd $(SRCDIR) && git submodule deinit ui/keycodemapdb || true
41 rm -rf $(SRCDIR)/ui/keycodemapdb
42 mkdir $(SRCDIR)/ui/keycodemapdb
43 cd $(SRCDIR) && git submodule update --init ui/keycodemapdb
6838f038
WB
44 rm -rf keycodemapdb
45 mkdir keycodemapdb
06299321 46 cp -R $(SRCDIR)/ui/keycodemapdb/* keycodemapdb/
6838f038
WB
47 git add keycodemapdb
48
95259824
WB
49.PHONY: upload
50upload: $(DEBS)
a544966d 51 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch
95259824 52
06299321 53.PHONY: distclean clean
95259824 54distclean: clean
95259824 55clean:
0a321ffd 56 rm -rf $(BUILDDIR) $(PACKAGE)*.deb *.buildinfo *.changes
95259824
WB
57
58.PHONY: dinstall
59dinstall: $(DEBS)
60 dpkg -i $(DEBS)