]>
Commit | Line | Data |
---|---|---|
975b5018 | 1 | RELEASE=4.4 |
270f2667 DM |
2 | |
3 | PACKAGE=lxcfs | |
975b5018 WB |
4 | PKGVER=2.0.6 |
5 | DEBREL=pve1 | |
270f2667 DM |
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 | ||
fde1adc6 WB |
13 | DEB1=${PACKAGE}_${PKGVER}-${DEBREL}_${ARCH}.deb |
14 | DEB2=${PACKAGE}-dbg_${PKGVER}-${DEBREL}_${ARCH}.deb | |
15 | DEBS=$(DEB1) $(DEB2) | |
270f2667 DM |
16 | |
17 | all: ${DEB} | |
18 | ||
261830cd | 19 | .PHONY: deb |
fde1adc6 WB |
20 | deb: $(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 | |
33 | download ${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 | 40 | upload: $(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 | ||
50 | distclean: clean | |
51 | ||
52 | .PHONY: clean | |
53 | clean: | |
54 | rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc | |
55 | find . -name '*~' -exec rm {} ';' | |
56 | ||
57 | .PHONY: dinstall | |
fde1adc6 WB |
58 | dinstall: $(DEBS) |
59 | dpkg -i $(DEBS) |