]> git.proxmox.com Git - lxcfs.git/blame - Makefile
switch upload dist to bookworm
[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}
a2e9bc87 7BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
736ee754 8ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
270f2667 9
3f783aec 10GITVERSION:=$(shell git rev-parse HEAD)
270f2667 11
736ee754 12DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
a2e9bc87
TL
13DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
14DBGDEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
15DEBS=$(DEB) $(DBGDEB)
270f2667
DM
16
17all: ${DEB}
18
3f783aec
WB
19.PHONY: submodule
20submodule:
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 30deb: $(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
40dsc: $(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 47upload: $(DEBS)
5959e958 48 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist bookworm
270f2667 49
a2e9bc87 50.PHONY: clean distclean
270f2667 51clean:
5b289f05 52 rm -rf $(PACKAGE)-[0-9]*/ $(ORIG_SRC_TAR) *.deb *.dsc $(PACKAGE)*.debian.tar.[gx]z *.changes *.dsc *.buildinfo *.build
a2e9bc87
TL
53
54distclean: clean
55 git submodule deinit --all
270f2667
DM
56
57.PHONY: dinstall
fde1adc6
WB
58dinstall: $(DEBS)
59 dpkg -i $(DEBS)