]>
Commit | Line | Data |
---|---|---|
177f98f6 TL |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | include /usr/share/dpkg/architecture.mk | |
3 | ||
b76bfba9 | 4 | PACKAGE=lxc-pve |
70e0da62 | 5 | |
b76bfba9 | 6 | SRCDIR=lxc |
177f98f6 | 7 | BUILDSRC := $(PACKAGE)-$(DEB_VERSION_UPSTREAM) |
70e0da62 | 8 | |
177f98f6 TL |
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 | |
30da3479 | 13 | DEBS=$(DEB1) $(DEB2) |
c63c177d | 14 | DSC=$(DEB_BASE).dsc |
abc0d17b | 15 | ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz |
70e0da62 | 16 | |
c63c177d WB |
17 | all: $(DEBS) |
18 | echo $(DEBS) | |
9108d962 | 19 | |
bc7e56ac WB |
20 | .PHONY: submodule |
21 | submodule: | |
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 | |
35 | deb: $(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 | |
abc0d17b TL |
42 | $(ORIG_SRC_TAR): $(BUILDSRC) |
43 | tar czf $(ORIG_SRC_TAR) -C $(BUILDSRC) . | |
44 | ||
c63c177d | 45 | .PHONY: dsc |
abc0d17b TL |
46 | dsc: $(DSC) |
47 | $(DSC): $(ORIG_SRC_TAR) | |
c63c177d WB |
48 | rm -f *.dsc |
49 | cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc | |
50 | lintian $(DSC) | |
51 | ||
9108d962 | 52 | .PHONY: upload |
c63c177d | 53 | upload: $(DEBS) |
505eee09 | 54 | tar cf - $(DEBS) | ssh repoman@repo.proxmox.com upload --product pve --dist bookworm |
9108d962 | 55 | |
70e0da62 DM |
56 | distclean: clean |
57 | ||
58 | .PHONY: clean | |
59 | clean: | |
1f09877d | 60 | rm -rf $(BUILDSRC) $(PACKAGE)-[0-9]*/ $(ORIG_SRC_TAR) *.deb *.dsc $(PACKAGE)*.debian.tar.[gx]z *.changes *.dsc *.buildinfo *.build |
9108d962 DM |
61 | |
62 | .PHONY: dinstall | |
c63c177d WB |
63 | dinstall: $(DEBS) |
64 | dpkg -i $(DEBS) |