]>
Commit | Line | Data |
---|---|---|
a2e9bc87 TL |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | include /usr/share/dpkg/architecture.mk | |
3 | ||
270f2667 | 4 | PACKAGE=lxcfs |
270f2667 DM |
5 | |
6 | SRCDIR=${PACKAGE} | |
3f783aec | 7 | BUILDSRC := $(SRCDIR).tmp |
a2e9bc87 | 8 | BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} |
270f2667 | 9 | |
3f783aec | 10 | GITVERSION:=$(shell git rev-parse HEAD) |
270f2667 | 11 | |
a2e9bc87 TL |
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) | |
270f2667 DM |
15 | |
16 | all: ${DEB} | |
17 | ||
3f783aec WB |
18 | .PHONY: submodule |
19 | submodule: | |
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 | 29 | deb: $(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 | 36 | upload: $(DEBS) |
6d9f43e0 | 37 | tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch |
270f2667 | 38 | |
a2e9bc87 | 39 | .PHONY: clean distclean |
270f2667 | 40 | clean: |
a2e9bc87 TL |
41 | rm -rf $(PACKAGE)-*/ *.deb *.changes *.dsc *.buildinfo |
42 | ||
43 | distclean: clean | |
44 | git submodule deinit --all | |
270f2667 DM |
45 | |
46 | .PHONY: dinstall | |
fde1adc6 WB |
47 | dinstall: $(DEBS) |
48 | dpkg -i $(DEBS) |