]>
Commit | Line | Data |
---|---|---|
1 | include /usr/share/dpkg/pkg-info.mk | |
2 | include /usr/share/dpkg/architecture.mk | |
3 | ||
4 | PACKAGE=lxcfs | |
5 | ||
6 | SRCDIR=${PACKAGE} | |
7 | BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} | |
8 | ||
9 | GITVERSION:=$(shell git rev-parse HEAD) | |
10 | ||
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) | |
14 | ||
15 | all: ${DEB} | |
16 | ||
17 | .PHONY: submodule | |
18 | submodule: | |
19 | test -f "${SRCDIR}/README" || git submodule update --init | |
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 | |
26 | ||
27 | .PHONY: deb | |
28 | deb: $(DEBS) | |
29 | $(DBGDEB): $(DEB) | |
30 | $(DEB): $(BUILDDIR) | |
31 | cd $(BUILDDIR); dpkg-buildpackage -rfakeroot -b -us -uc | |
32 | lintian $(DEBS) | |
33 | ||
34 | .PHONY: upload | |
35 | upload: $(DEBS) | |
36 | tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch | |
37 | ||
38 | .PHONY: clean distclean | |
39 | clean: | |
40 | rm -rf $(PACKAGE)-*/ *.deb *.changes *.dsc *.buildinfo | |
41 | ||
42 | distclean: clean | |
43 | git submodule deinit --all | |
44 | ||
45 | .PHONY: dinstall | |
46 | dinstall: $(DEBS) | |
47 | dpkg -i $(DEBS) |