]> git.proxmox.com Git - lxc.git/blame - Makefile
buildsys: job-safe deb target
[lxc.git] / Makefile
CommitLineData
63700eaf 1RELEASE=4.4
70e0da62 2
b76bfba9 3PACKAGE=lxc-pve
63700eaf 4LXCVER=2.0.7
c74bd22c 5DEBREL=2
70e0da62 6
b76bfba9 7SRCDIR=lxc
70e0da62
DM
8SRCTAR=${SRCDIR}.tgz
9
9108d962
DM
10ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
11GITVERSION:=$(shell cat .git/refs/heads/master)
70e0da62 12
30da3479
WB
13DEB1=${PACKAGE}_${LXCVER}-${DEBREL}_${ARCH}.deb
14DEB2=${PACKAGE}-dev_${LXCVER}-${DEBREL}_${ARCH}.deb \
15 ${PACKAGE}-dbg_${LXCVER}-${DEBREL}_${ARCH}.deb
16DEBS=$(DEB1) $(DEB2)
70e0da62 17
9108d962
DM
18all: ${DEBS}
19 echo ${DEBS}
20
b158cb38
WB
21.PHONY: deb
22deb: ${DEBS}
30da3479
WB
23$(DEB2): $(DEB1)
24$(DEB1): ${SRCTAR}
9108d962
DM
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
70e0da62
DM
34download ${SRCTAR}:
35 rm -rf ${SRCDIR} ${SRCTAR}
d2cfdb36 36 git clone -b lxc-${LXCVER} git://github.com/lxc/lxc
70e0da62
DM
37 tar czf ${SRCTAR}.tmp ${SRCDIR}
38 mv ${SRCTAR}.tmp ${SRCTAR}
39
9108d962
DM
40.PHONY: upload
41upload: ${DEBS}
ec09f354 42 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload
9108d962 43
70e0da62
DM
44distclean: clean
45
46.PHONY: clean
47clean:
9108d962 48 rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
70e0da62 49 find . -name '*~' -exec rm {} ';'
9108d962
DM
50
51.PHONY: dinstall
52dinstall: ${DEBS}
53 dpkg -i ${DEBS}