]> git.proxmox.com Git - lxc.git/blob - Makefile
bump version to 6.0.0-1
[lxc.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2 include /usr/share/dpkg/architecture.mk
3
4 PACKAGE=lxc-pve
5
6 SRCDIR=lxc
7 BUILDSRC := $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
8
9 DEB_BASE=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)
10 DEB1=$(DEB_BASE)_$(DEB_BUILD_ARCH).deb
11 DEB2=$(PACKAGE)-dev_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb \
12 $(PACKAGE)-dbgsym_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb
13 DEBS=$(DEB1) $(DEB2)
14 DSC=$(DEB_BASE).dsc
15 TARGZ=$(DEB_BASE).tar.gz
16
17 all: $(DEBS)
18 echo $(DEBS)
19
20 .PHONY: submodule
21 submodule:
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
35 deb: $(DEBS)
36 $(DEB2): $(DEB1)
37 $(DEB1): $(BUILDSRC)
38 rm -f *.deb
39 cd $(BUILDSRC); dpkg-buildpackage -b -us -uc
40 lintian $(DEBS)
41
42 .PHONY: dsc
43 dsc $(TARGZ): $(DSC)
44 $(DSC): $(BUILDSRC)
45 rm -f *.dsc
46 cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
47 lintian $(DSC)
48
49 .PHONY: upload
50 upload: $(DEBS)
51 tar cf - $(DEBS) | ssh repoman@repo.proxmox.com upload --product pve --dist buster
52
53 distclean: clean
54
55 .PHONY: clean
56 clean:
57 rm -rf $(BUILDSRC) *.deb *.dsc *.tar.gz *.changes *.dsc *.buildinfo
58
59 .PHONY: dinstall
60 dinstall: $(DEBS)
61 dpkg -i $(DEBS)