]>
Commit | Line | Data |
---|---|---|
bee2aa9a DM |
1 | RELEASE=4.0 |
2 | ||
3 | PACKAGE=criu | |
2074ce66 | 4 | PKGVER=1.6.0 |
bee2aa9a DM |
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 | ||
4bd1b0d3 WB |
13 | DEB1=${PACKAGE}_${PKGVER}-${DEBREL}_amd64.deb |
14 | DEB_DBG=${PACKAGE}-dbg_${PKGVER}-${DEBREL}_amd64.deb | |
15 | DEBS=$(DEB1) $(DEB_DBG) | |
bee2aa9a DM |
16 | |
17 | all: ${DEBS} | |
18 | echo ${DEBS} | |
19 | ||
4bd1b0d3 WB |
20 | .PHONY: deb |
21 | deb $(DEB_DBG): $(DEB1) | |
22 | $(DEB1): $(SRCTAR) | |
bee2aa9a DM |
23 | rm -rf ${SRCDIR} |
24 | tar xf ${SRCTAR} | |
25 | cp -a debian ${SRCDIR}/debian | |
26 | echo "git clone git://git.proxmox.com/git/criu.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE | |
27 | cd ${SRCDIR}; dpkg-buildpackage -rfakeroot -b -us -uc | |
28 | lintian ${DEBS} | |
29 | ||
30 | ||
31 | .PHONY: download | |
32 | download ${SRCTAR}: | |
33 | rm -rf ${SRCDIR} ${SRCTAR} ${SRCTAR}.tmp | |
34 | git clone https://github.com/xemul/${SRCDIR} | |
35 | tar czf ${SRCTAR}.tmp ${SRCDIR} | |
36 | mv ${SRCTAR}.tmp ${SRCTAR} | |
2074ce66 | 37 | |
bee2aa9a DM |
38 | .PHONY: upload |
39 | upload: ${DEBS} | |
40 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw | |
41 | mkdir -p /pve/${RELEASE}/extra | |
42 | rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb | |
43 | rm -f /pve/${RELEASE}/extra/${PACKAGE}-dbg_*.deb | |
44 | rm -f /pve/${RELEASE}/extra/Packages* | |
45 | cp ${DEBS} /pve/${RELEASE}/extra | |
46 | cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz | |
47 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro | |
48 | ||
49 | distclean: clean | |
50 | ||
51 | .PHONY: clean | |
52 | clean: | |
53 | rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc | |
54 | find . -name '*~' -exec rm {} ';' | |
55 | ||
56 | .PHONY: dinstall | |
57 | dinstall: ${DEBS} | |
58 | dpkg -i ${DEBS} |