]> git.proxmox.com Git - criu.git/blob - Makefile
eef1d1b76c3e8f4c50174b36db43ba7a2a9c83e8
[criu.git] / Makefile
1 RELEASE=4.0
2
3 PACKAGE=criu
4 PKGVER=1.5.2
5 DEBREL=1
6
7 SRCDIR=criu
8 SRCTAR=${SRCDIR}.tgz
9
10 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
11 GITVERSION:=$(shell cat .git/refs/heads/master)
12
13 DEBS= \
14 ${PACKAGE}_${PKGVER}-${DEBREL}_amd64.deb \
15 ${PACKAGE}-dbg_${PKGVER}-${DEBREL}_amd64.deb
16
17 all: ${DEBS}
18 echo ${DEBS}
19
20 deb ${DEBS}: ${SRCTAR}
21 rm -rf ${SRCDIR}
22 tar xf ${SRCTAR}
23 cp -a debian ${SRCDIR}/debian
24 echo "git clone git://git.proxmox.com/git/criu.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE
25 cd ${SRCDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
26 lintian ${DEBS}
27
28
29 .PHONY: download
30 download ${SRCTAR}:
31 rm -rf ${SRCDIR} ${SRCTAR} ${SRCTAR}.tmp
32 git clone https://github.com/xemul/${SRCDIR}
33 tar czf ${SRCTAR}.tmp ${SRCDIR}
34 mv ${SRCTAR}.tmp ${SRCTAR}
35 .PHONY: upload
36 upload: ${DEBS}
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 ${DEBS} /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: ${DEBS}
55 dpkg -i ${DEBS}