]>
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} | |
a2e9bc87 | 7 | BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} |
270f2667 | 8 | |
3f783aec | 9 | GITVERSION:=$(shell git rev-parse HEAD) |
270f2667 | 10 | |
a2e9bc87 TL |
11 | DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb |
12 | DBGDEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb | |
13 | DEBS=$(DEB) $(DBGDEB) | |
270f2667 DM |
14 | |
15 | all: ${DEB} | |
16 | ||
3f783aec WB |
17 | .PHONY: submodule |
18 | submodule: | |
ce6d8e46 | 19 | test -f "${SRCDIR}/README" || git submodule update --init |
a2e9bc87 TL |
20 | ${SRCDIR}/README: submodule |
21 | ||
22 | $(BUILDDIR): $(SRCDIR)/README debian | |
23 | rm -rf $(BUILDDIR) | |
24 | rsync -a $(SRCDIR)/ debian $(BUILDDIR) | |
25 | echo "git clone git://git.proxmox.com/git/lxcfs.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE | |
3f783aec | 26 | |
261830cd | 27 | .PHONY: deb |
fde1adc6 | 28 | deb: $(DEBS) |
a2e9bc87 TL |
29 | $(DBGDEB): $(DEB) |
30 | $(DEB): $(BUILDDIR) | |
31 | cd $(BUILDDIR); dpkg-buildpackage -rfakeroot -b -us -uc | |
15010c27 | 32 | lintian $(DEBS) |
270f2667 DM |
33 | |
34 | .PHONY: upload | |
fde1adc6 | 35 | upload: $(DEBS) |
6d9f43e0 | 36 | tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch |
270f2667 | 37 | |
a2e9bc87 | 38 | .PHONY: clean distclean |
270f2667 | 39 | clean: |
a2e9bc87 TL |
40 | rm -rf $(PACKAGE)-*/ *.deb *.changes *.dsc *.buildinfo |
41 | ||
42 | distclean: clean | |
43 | git submodule deinit --all | |
270f2667 DM |
44 | |
45 | .PHONY: dinstall | |
fde1adc6 WB |
46 | dinstall: $(DEBS) |
47 | dpkg -i $(DEBS) |