]>
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} |
736ee754 | 8 | ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz |
270f2667 | 9 | |
3f783aec | 10 | GITVERSION:=$(shell git rev-parse HEAD) |
270f2667 | 11 | |
736ee754 | 12 | DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc |
a2e9bc87 TL |
13 | DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb |
14 | DBGDEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb | |
15 | DEBS=$(DEB) $(DBGDEB) | |
270f2667 DM |
16 | |
17 | all: ${DEB} | |
18 | ||
3f783aec WB |
19 | .PHONY: submodule |
20 | submodule: | |
ce6d8e46 | 21 | test -f "${SRCDIR}/README" || git submodule update --init |
a2e9bc87 TL |
22 | ${SRCDIR}/README: submodule |
23 | ||
24 | $(BUILDDIR): $(SRCDIR)/README debian | |
25 | rm -rf $(BUILDDIR) | |
26 | rsync -a $(SRCDIR)/ debian $(BUILDDIR) | |
27 | echo "git clone git://git.proxmox.com/git/lxcfs.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE | |
3f783aec | 28 | |
261830cd | 29 | .PHONY: deb |
fde1adc6 | 30 | deb: $(DEBS) |
a2e9bc87 TL |
31 | $(DBGDEB): $(DEB) |
32 | $(DEB): $(BUILDDIR) | |
33 | cd $(BUILDDIR); dpkg-buildpackage -rfakeroot -b -us -uc | |
15010c27 | 34 | lintian $(DEBS) |
270f2667 | 35 | |
736ee754 TL |
36 | $(ORIG_SRC_TAR): $(BUILDDIR) |
37 | tar czf $(ORIG_SRC_TAR) -C $(BUILDDIR) . | |
38 | ||
39 | .PHONY: dsc | |
40 | dsc: $(DSC) | |
41 | $(DSC): $(ORIG_SRC_TAR) $(BUILDDIR) | |
42 | rm -f *.dsc | |
43 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d | |
44 | lintian $(DSC) | |
45 | ||
270f2667 | 46 | .PHONY: upload |
fde1adc6 | 47 | upload: $(DEBS) |
5959e958 | 48 | tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist bookworm |
270f2667 | 49 | |
a2e9bc87 | 50 | .PHONY: clean distclean |
270f2667 | 51 | clean: |
5b289f05 | 52 | rm -rf $(PACKAGE)-[0-9]*/ $(ORIG_SRC_TAR) *.deb *.dsc $(PACKAGE)*.debian.tar.[gx]z *.changes *.dsc *.buildinfo *.build |
a2e9bc87 TL |
53 | |
54 | distclean: clean | |
55 | git submodule deinit --all | |
270f2667 DM |
56 | |
57 | .PHONY: dinstall | |
fde1adc6 WB |
58 | dinstall: $(DEBS) |
59 | dpkg -i $(DEBS) |