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