]>
Commit | Line | Data |
---|---|---|
b76bfba9 | 1 | PACKAGE=lxc-pve |
f46e8fbf | 2 | LXCVER=3.0.2+pve1 |
2d8021b3 | 3 | DEBREL=1 |
70e0da62 | 4 | |
b76bfba9 | 5 | SRCDIR=lxc |
bc7e56ac | 6 | BUILDSRC := $(SRCDIR).tmp |
70e0da62 | 7 | |
9108d962 | 8 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
e15af1ab | 9 | GITVERSION:=$(shell git rev-parse HEAD) |
70e0da62 | 10 | |
30da3479 WB |
11 | DEB1=${PACKAGE}_${LXCVER}-${DEBREL}_${ARCH}.deb |
12 | DEB2=${PACKAGE}-dev_${LXCVER}-${DEBREL}_${ARCH}.deb \ | |
949a6e9f | 13 | ${PACKAGE}-dbgsym_${LXCVER}-${DEBREL}_${ARCH}.deb |
30da3479 | 14 | DEBS=$(DEB1) $(DEB2) |
70e0da62 | 15 | |
9108d962 DM |
16 | all: ${DEBS} |
17 | echo ${DEBS} | |
18 | ||
bc7e56ac WB |
19 | .PHONY: submodule |
20 | submodule: | |
21 | test -f "${SRCDIR}/debian/changelog" || git submodule update --init | |
22 | ||
b158cb38 WB |
23 | .PHONY: deb |
24 | deb: ${DEBS} | |
30da3479 | 25 | $(DEB2): $(DEB1) |
bc7e56ac WB |
26 | $(DEB1): | submodule |
27 | rm -f *.deb | |
28 | rm -rf $(BUILDSRC) | |
2d8021b3 | 29 | cp -a $(SRCDIR) $(BUILDSRC) |
bc7e56ac | 30 | cp -a debian $(BUILDSRC)/debian |
9cd5bbf7 WB |
31 | mkdir $(BUILDSRC)/debian/config |
32 | for i in config/*.conf.in; do \ | |
33 | sed -e 's|@LXCTEMPLATECONFIG@|/usr/share/lxc/config|g' $$i > $(BUILDSRC)/debian/$${i%.in} ; \ | |
34 | done | |
bc7e56ac WB |
35 | echo "git clone git://git.proxmox.com/git/lxc.git\\ngit checkout $(GITVERSION)" > $(BUILDSRC)/debian/SOURCE |
36 | cd $(BUILDSRC); dpkg-buildpackage -rfakeroot -b -us -uc | |
37 | lintian $(DEBS) | |
70e0da62 | 38 | |
9108d962 DM |
39 | .PHONY: upload |
40 | upload: ${DEBS} | |
0e1943c7 | 41 | tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch |
9108d962 | 42 | |
70e0da62 DM |
43 | distclean: clean |
44 | ||
45 | .PHONY: clean | |
46 | clean: | |
bc7e56ac | 47 | rm -rf $(BUILDSRC) *_${ARCH}.deb *.changes *.dsc *.buildinfo |
9108d962 DM |
48 | |
49 | .PHONY: dinstall | |
50 | dinstall: ${DEBS} | |
51 | dpkg -i ${DEBS} |