]> git.proxmox.com Git - lxcfs.git/blob - Makefile
buildsys: use dpkg-dev makefile helpers for pkg info
[lxcfs.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2 include /usr/share/dpkg/architecture.mk
3
4 PACKAGE=lxcfs
5
6 SRCDIR=${PACKAGE}
7 BUILDSRC := $(SRCDIR).tmp
8 BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
9
10 GITVERSION:=$(shell git rev-parse HEAD)
11
12 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
13 DBGDEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
14 DEBS=$(DEB) $(DBGDEB)
15
16 all: ${DEB}
17
18 .PHONY: submodule
19 submodule:
20 test -f "${SRCDIR}/README" || git submodule update --init
21 ${SRCDIR}/README: submodule
22
23 $(BUILDDIR): $(SRCDIR)/README debian
24 rm -rf $(BUILDDIR)
25 rsync -a $(SRCDIR)/ debian $(BUILDDIR)
26 echo "git clone git://git.proxmox.com/git/lxcfs.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
27
28 .PHONY: deb
29 deb: $(DEBS)
30 $(DBGDEB): $(DEB)
31 $(DEB): $(BUILDDIR)
32 cd $(BUILDDIR); dpkg-buildpackage -rfakeroot -b -us -uc
33 #lintian $(DEBS)
34
35 .PHONY: upload
36 upload: $(DEBS)
37 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch
38
39 .PHONY: clean distclean
40 clean:
41 rm -rf $(PACKAGE)-*/ *.deb *.changes *.dsc *.buildinfo
42
43 distclean: clean
44 git submodule deinit --all
45
46 .PHONY: dinstall
47 dinstall: $(DEBS)
48 dpkg -i $(DEBS)