]> git.proxmox.com Git - lxc.git/blob - Makefile
buildsys: job-safe deb target
[lxc.git] / Makefile
1 RELEASE=4.4
2
3 PACKAGE=lxc-pve
4 LXCVER=2.0.7
5 DEBREL=2
6
7 SRCDIR=lxc
8 SRCTAR=${SRCDIR}.tgz
9
10 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
11 GITVERSION:=$(shell cat .git/refs/heads/master)
12
13 DEB1=${PACKAGE}_${LXCVER}-${DEBREL}_${ARCH}.deb
14 DEB2=${PACKAGE}-dev_${LXCVER}-${DEBREL}_${ARCH}.deb \
15 ${PACKAGE}-dbg_${LXCVER}-${DEBREL}_${ARCH}.deb
16 DEBS=$(DEB1) $(DEB2)
17
18 all: ${DEBS}
19 echo ${DEBS}
20
21 .PHONY: deb
22 deb: ${DEBS}
23 $(DEB2): $(DEB1)
24 $(DEB1): ${SRCTAR}
25 rm -rf ${SRCDIR}
26 tar xf ${SRCTAR}
27 cp -a debian ${SRCDIR}/debian
28 echo "git clone git://git.proxmox.com/git/lxc.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE
29 cd ${SRCDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
30 lintian ${DEBS}
31
32
33 .PHONY: download
34 download ${SRCTAR}:
35 rm -rf ${SRCDIR} ${SRCTAR}
36 git clone -b lxc-${LXCVER} git://github.com/lxc/lxc
37 tar czf ${SRCTAR}.tmp ${SRCDIR}
38 mv ${SRCTAR}.tmp ${SRCTAR}
39
40 .PHONY: upload
41 upload: ${DEBS}
42 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload
43
44 distclean: clean
45
46 .PHONY: clean
47 clean:
48 rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
49 find . -name '*~' -exec rm {} ';'
50
51 .PHONY: dinstall
52 dinstall: ${DEBS}
53 dpkg -i ${DEBS}