]> git.proxmox.com Git - lxc.git/blame - Makefile
merge fix for 'getent' in lxc-attach
[lxc.git] / Makefile
CommitLineData
177f98f6
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
3
b76bfba9 4PACKAGE=lxc-pve
70e0da62 5
b76bfba9 6SRCDIR=lxc
177f98f6 7BUILDSRC := $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
70e0da62 8
177f98f6
TL
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
30da3479 13DEBS=$(DEB1) $(DEB2)
c63c177d
WB
14DSC=$(DEB_BASE).dsc
15TARGZ=$(DEB_BASE).tar.gz
70e0da62 16
c63c177d
WB
17all: $(DEBS)
18 echo $(DEBS)
9108d962 19
bc7e56ac
WB
20.PHONY: submodule
21submodule:
c63c177d 22 test -f "$(SRCDIR)/debian/changelog" || git submodule update --init
bc7e56ac 23
c63c177d 24$(BUILDSRC): lxc debian config | submodule
bc7e56ac 25 rm -rf $(BUILDSRC)
2d8021b3 26 cp -a $(SRCDIR) $(BUILDSRC)
bc7e56ac 27 cp -a debian $(BUILDSRC)/debian
9cd5bbf7
WB
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
c63c177d
WB
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
bc7e56ac 40 lintian $(DEBS)
70e0da62 41
c63c177d
WB
42.PHONY: dsc
43dsc $(TARGZ): $(DSC)
44$(DSC): $(BUILDSRC)
45 rm -f *.dsc
46 cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
47 lintian $(DSC)
48
9108d962 49.PHONY: upload
c63c177d 50upload: $(DEBS)
ca0c586e 51 tar cf - $(DEBS) | ssh repoman@repo.proxmox.com upload --product pve --dist buster
9108d962 52
70e0da62
DM
53distclean: clean
54
55.PHONY: clean
56clean:
177f98f6 57 rm -rf $(BUILDSRC) *.deb *.dsc *.tar.gz *.changes *.dsc *.buildinfo
9108d962
DM
58
59.PHONY: dinstall
c63c177d
WB
60dinstall: $(DEBS)
61 dpkg -i $(DEBS)