]> git.proxmox.com Git - lxc.git/blob - Makefile
bump version to 3.0.1+pve1-1
[lxc.git] / Makefile
1 PACKAGE=lxc-pve
2 LXCVER=3.0.1+pve1
3 DEBREL=1
4
5 SRCDIR=lxc
6 BUILDSRC := $(SRCDIR).tmp
7
8 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
9 GITVERSION:=$(shell git rev-parse HEAD)
10
11 DEB1=${PACKAGE}_${LXCVER}-${DEBREL}_${ARCH}.deb
12 DEB2=${PACKAGE}-dev_${LXCVER}-${DEBREL}_${ARCH}.deb \
13 ${PACKAGE}-dbgsym_${LXCVER}-${DEBREL}_${ARCH}.deb
14 DEBS=$(DEB1) $(DEB2)
15
16 all: ${DEBS}
17 echo ${DEBS}
18
19 .PHONY: submodule
20 submodule:
21 test -f "${SRCDIR}/debian/changelog" || git submodule update --init
22
23 .PHONY: deb
24 deb: ${DEBS}
25 $(DEB2): $(DEB1)
26 $(DEB1): | submodule
27 rm -f *.deb
28 rm -rf $(BUILDSRC)
29 cp -a $(SRCDIR) $(BUILDSRC)
30 cp -a debian $(BUILDSRC)/debian
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
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)
38
39 .PHONY: update-template-configs
40 update-template-configs:
41 test -d lxc-templates || git clone https://github.com/lxc/lxc-templates lxc-templates
42 cd lxc-templates && git pull
43 rm -rf config
44 cp -R lxc-templates/config config
45 rm -f config/*.am config/*.m4
46 git add config
47
48 .PHONY: upload
49 upload: ${DEBS}
50 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch
51
52 distclean: clean
53
54 .PHONY: clean
55 clean:
56 rm -rf $(BUILDSRC) *_${ARCH}.deb *.changes *.dsc *.buildinfo
57
58 .PHONY: dinstall
59 dinstall: ${DEBS}
60 dpkg -i ${DEBS}