]> git.proxmox.com Git - lxcfs.git/blob - Makefile
bf2edfac0726c06c2fe2371b0a25cb95f7ad79cb
[lxcfs.git] / Makefile
1 RELEASE=4.1
2
3 PACKAGE=lxcfs
4 PKGVER=2.0.0
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}_amd64.deb \
14 ${PACKAGE}-dbg_${PKGVER}-${DEBREL}_amd64.deb
15
16 all: ${DEB}
17
18 deb ${DEB}: ${SRCTAR}
19 rm -rf ${SRCDIR}
20 tar xf ${SRCTAR}
21 cp -a debian ${SRCDIR}/debian
22 echo "git clone git://git.proxmox.com/git/lxcfs.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE
23 echo "debian/SOURCE" >> ${SRCDIR}/debian/docs
24 cd ${SRCDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
25 #lintian ${DEB}
26
27
28 .PHONY: download
29 download ${SRCTAR}:
30 rm -rf ${SRCDIR} ${SRCTAR}
31 git clone git://github.com/lxc/lxcfs
32 tar czf ${SRCTAR}.tmp ${SRCDIR}
33 mv ${SRCTAR}.tmp ${SRCTAR}
34
35 .PHONY: upload
36 upload: ${DEB}
37 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
38 mkdir -p /pve/${RELEASE}/extra
39 rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
40 rm -f /pve/${RELEASE}/extra/${PACKAGE}-dbg_*.deb
41 rm -f /pve/${RELEASE}/extra/Packages*
42 cp ${DEB} /pve/${RELEASE}/extra
43 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
44 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
45
46 distclean: clean
47
48 .PHONY: clean
49 clean:
50 rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
51 find . -name '*~' -exec rm {} ';'
52
53 .PHONY: dinstall
54 dinstall: ${DEB}
55 dpkg -i ${DEB}