]> git.proxmox.com Git - lxcfs.git/blob - Makefile
buildsys: make job safety
[lxcfs.git] / Makefile
1 RELEASE=4.4
2
3 PACKAGE=lxcfs
4 PKGVER=2.0.6
5 DEBREL=pve1
6
7 SRCDIR=${PACKAGE}
8 SRCTAR=${SRCDIR}.tgz
9
10 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
11 GITVERSION:=$(shell cat .git/refs/heads/master)
12
13 DEB=${PACKAGE}_${PKGVER}-${DEBREL}_${ARCH}.deb \
14 ${PACKAGE}-dbg_${PKGVER}-${DEBREL}_${ARCH}.deb
15
16 all: ${DEB}
17
18 .PHONY: deb
19 deb: ${DEB}
20 ${DEB}: ${SRCTAR}
21 rm -rf ${SRCDIR}
22 tar xf ${SRCTAR}
23 cp -a debian ${SRCDIR}/debian
24 echo "git clone git://git.proxmox.com/git/lxcfs.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE
25 echo "debian/SOURCE" >> ${SRCDIR}/debian/docs
26 cd ${SRCDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
27 #lintian ${DEB}
28
29
30 .PHONY: download
31 download ${SRCTAR}:
32 rm -rf ${SRCDIR} ${SRCTAR}
33 git clone --depth=1 -b lxcfs-${PKGVER} git://github.com/lxc/lxcfs
34 tar czf ${SRCTAR}.tmp ${SRCDIR}
35 mv ${SRCTAR}.tmp ${SRCTAR}
36
37 .PHONY: upload
38 upload: ${DEB}
39 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
40 mkdir -p /pve/${RELEASE}/extra
41 rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
42 rm -f /pve/${RELEASE}/extra/${PACKAGE}-dbg_*.deb
43 rm -f /pve/${RELEASE}/extra/Packages*
44 cp ${DEB} /pve/${RELEASE}/extra
45 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
46 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
47
48 distclean: clean
49
50 .PHONY: clean
51 clean:
52 rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
53 find . -name '*~' -exec rm {} ';'
54
55 .PHONY: dinstall
56 dinstall: ${DEB}
57 dpkg -i ${DEB}