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