]> git.proxmox.com Git - lxc.git/blame_incremental - Makefile
bump version to 6.0.0-1
[lxc.git] / Makefile
... / ...
CommitLineData
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
3
4PACKAGE=lxc-pve
5
6SRCDIR=lxc
7BUILDSRC := $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
8
9DEB_BASE=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)
10DEB1=$(DEB_BASE)_$(DEB_BUILD_ARCH).deb
11DEB2=$(PACKAGE)-dev_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb \
12 $(PACKAGE)-dbgsym_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb
13DEBS=$(DEB1) $(DEB2)
14DSC=$(DEB_BASE).dsc
15ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
16
17all: $(DEBS)
18 echo $(DEBS)
19
20.PHONY: submodule
21submodule:
22 test -f "$(SRCDIR)/debian/changelog" || git submodule update --init
23
24$(BUILDSRC): lxc debian config | submodule
25 rm -rf $(BUILDSRC)
26 cp -a $(SRCDIR) $(BUILDSRC)
27 cp -a debian $(BUILDSRC)/debian
28 mkdir $(BUILDSRC)/debian/config
29 for i in config/*.conf.in; do \
30 sed -e 's|@LXCTEMPLATECONFIG@|/usr/share/lxc/config|g' $$i > $(BUILDSRC)/debian/$${i%.in} ; \
31 done
32 echo "git clone git://git.proxmox.com/git/lxc.git\\ngit checkout $(shell git rev-parse HEAD)" > $(BUILDSRC)/debian/SOURCE
33
34.PHONY: deb
35deb: $(DEBS)
36$(DEB2): $(DEB1)
37$(DEB1): $(BUILDSRC)
38 rm -f *.deb
39 cd $(BUILDSRC); dpkg-buildpackage -b -us -uc
40 lintian $(DEBS)
41
42$(ORIG_SRC_TAR): $(BUILDSRC)
43 tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDSRC)/debian" $(BUILDSRC)
44
45.PHONY: dsc
46dsc: $(DSC)
47$(DSC): $(ORIG_SRC_TAR)
48 rm -f *.dsc
49 cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d
50 lintian $(DSC)
51
52sbuild: $(DSC)
53 sbuild $(DSC)
54
55.PHONY: upload
56upload: $(DEBS)
57 tar cf - $(DEBS) | ssh repoman@repo.proxmox.com upload --product pve --dist bookworm
58
59distclean: clean
60
61.PHONY: clean
62clean:
63 rm -rf $(BUILDSRC) $(PACKAGE)-[0-9]*/ $(ORIG_SRC_TAR) *.deb *.dsc $(PACKAGE)*.debian.tar.[gx]z *.changes *.dsc *.buildinfo *.build
64
65.PHONY: dinstall
66dinstall: $(DEBS)
67 dpkg -i $(DEBS)