]>
Commit | Line | Data |
---|---|---|
b76bfba9 | 1 | PACKAGE=lxc-pve |
ead59884 WB |
2 | PKGVER != dpkg-parsechangelog -Sversion | cut -d- -f1 |
3 | PKGREL != dpkg-parsechangelog -Sversion | cut -d- -f2 | |
70e0da62 | 4 | |
b76bfba9 | 5 | SRCDIR=lxc |
ead59884 | 6 | BUILDSRC := $(PACKAGE)-$(PKGVER) |
70e0da62 | 7 | |
9108d962 | 8 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
70e0da62 | 9 | |
ead59884 | 10 | DEB_BASE=$(PACKAGE)_$(PKGVER)-$(PKGREL) |
c63c177d | 11 | DEB1=$(DEB_BASE)_$(ARCH).deb |
ead59884 WB |
12 | DEB2=$(PACKAGE)-dev_$(PKGVER)-$(PKGREL)_$(ARCH).deb \ |
13 | $(PACKAGE)-dbgsym_$(PKGVER)-$(PKGREL)_$(ARCH).deb | |
30da3479 | 14 | DEBS=$(DEB1) $(DEB2) |
c63c177d WB |
15 | DSC=$(DEB_BASE).dsc |
16 | TARGZ=$(DEB_BASE).tar.gz | |
70e0da62 | 17 | |
c63c177d WB |
18 | all: $(DEBS) |
19 | echo $(DEBS) | |
9108d962 | 20 | |
bc7e56ac WB |
21 | .PHONY: submodule |
22 | submodule: | |
c63c177d | 23 | test -f "$(SRCDIR)/debian/changelog" || git submodule update --init |
bc7e56ac | 24 | |
c63c177d | 25 | $(BUILDSRC): lxc debian config | submodule |
bc7e56ac | 26 | rm -rf $(BUILDSRC) |
2d8021b3 | 27 | cp -a $(SRCDIR) $(BUILDSRC) |
bc7e56ac | 28 | cp -a debian $(BUILDSRC)/debian |
9cd5bbf7 WB |
29 | mkdir $(BUILDSRC)/debian/config |
30 | for i in config/*.conf.in; do \ | |
31 | sed -e 's|@LXCTEMPLATECONFIG@|/usr/share/lxc/config|g' $$i > $(BUILDSRC)/debian/$${i%.in} ; \ | |
32 | done | |
c63c177d WB |
33 | echo "git clone git://git.proxmox.com/git/lxc.git\\ngit checkout $(shell git rev-parse HEAD)" > $(BUILDSRC)/debian/SOURCE |
34 | ||
35 | .PHONY: deb | |
36 | deb: $(DEBS) | |
37 | $(DEB2): $(DEB1) | |
38 | $(DEB1): $(BUILDSRC) | |
39 | rm -f *.deb | |
40 | cd $(BUILDSRC); dpkg-buildpackage -b -us -uc | |
bc7e56ac | 41 | lintian $(DEBS) |
70e0da62 | 42 | |
c63c177d WB |
43 | .PHONY: dsc |
44 | dsc $(TARGZ): $(DSC) | |
45 | $(DSC): $(BUILDSRC) | |
46 | rm -f *.dsc | |
47 | cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc | |
48 | lintian $(DSC) | |
49 | ||
9108d962 | 50 | .PHONY: upload |
c63c177d WB |
51 | upload: $(DEBS) |
52 | tar cf - $(DEBS) | ssh repoman@repo.proxmox.com upload --product pve --dist stretch | |
9108d962 | 53 | |
70e0da62 DM |
54 | distclean: clean |
55 | ||
56 | .PHONY: clean | |
57 | clean: | |
c63c177d | 58 | rm -rf $(BUILDSRC) *_$(ARCH).deb *_$(ARCH).dsc *.tar.gz *.changes *.dsc *.buildinfo |
9108d962 DM |
59 | |
60 | .PHONY: dinstall | |
c63c177d WB |
61 | dinstall: $(DEBS) |
62 | dpkg -i $(DEBS) |