]>
Commit | Line | Data |
---|---|---|
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 | ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.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 | $(ORIG_SRC_TAR): $(BUILDSRC) | |
43 | tar czf $(ORIG_SRC_TAR) -C $(BUILDSRC) . | |
44 | ||
45 | .PHONY: dsc | |
46 | dsc: $(DSC) | |
47 | $(DSC): $(ORIG_SRC_TAR) | |
48 | rm -f *.dsc | |
49 | cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc | |
50 | lintian $(DSC) | |
51 | ||
52 | .PHONY: upload | |
53 | upload: $(DEBS) | |
54 | tar cf - $(DEBS) | ssh repoman@repo.proxmox.com upload --product pve --dist bookworm | |
55 | ||
56 | distclean: clean | |
57 | ||
58 | .PHONY: clean | |
59 | clean: | |
60 | rm -rf $(BUILDSRC) $(PACKAGE)-[0-9]*/ $(ORIG_SRC_TAR) *.deb *.dsc $(PACKAGE)*.debian.tar.[gx]z *.changes *.dsc *.buildinfo *.build | |
61 | ||
62 | .PHONY: dinstall | |
63 | dinstall: $(DEBS) | |
64 | dpkg -i $(DEBS) |