]>
Commit | Line | Data |
---|---|---|
e8b26e6c DM |
1 | RELEASE=4.0 |
2 | ||
3 | # simple backport from debian sid | |
4 | ||
5 | PACKAGE=cgmanager | |
c04d3f17 | 6 | PKGVER=0.37 |
4826a663 | 7 | DEBREL=pve2 |
e8b26e6c DM |
8 | |
9 | # also update changelog | |
10 | ||
11 | PKGSRC=${PACKAGE}.tgz | |
12 | PKGDIR=${PACKAGE} | |
13 | ||
14 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) | |
15 | GITVERSION:=$(shell cat .git/refs/heads/master) | |
16 | SOURCETXT="git clone git://git.proxmox.com/git/pve/cgmanager.git\\ngit checkout ${GITVERSION}" | |
17 | ||
18 | DEBS= \ | |
19 | lib${PACKAGE}-dev_${PKGVER}-${DEBREL}_${ARCH}.deb \ | |
20 | lib${PACKAGE}0_${PKGVER}-${DEBREL}_${ARCH}.deb \ | |
21 | ${PACKAGE}_${PKGVER}-${DEBREL}_${ARCH}.deb | |
22 | ||
23 | all: ${DEBS} | |
24 | ||
25 | .PHONY: dinstall | |
26 | dinstall: ${DEBS} | |
27 | dpkg -i ${DEBS} | |
28 | ||
29 | .PHONY: deb | |
30 | deb ${DEBS}: ${PKGSRC} | |
31 | rm -rf ${PKGDIR} | |
32 | tar xf ${PKGSRC} | |
33 | cp -a debian ${PKGDIR}/debian | |
34 | echo "${SOURCETXT}" > ${PKGDIR}/debian/SOURCE | |
35 | echo "debian/SOURCE" >>${PKGDIR}/debian/docs | |
36 | cd ${PKGDIR}; dpkg-buildpackage -b -uc -us | |
37 | lintian ${DEBS} | |
38 | ||
39 | .PHONY: download | |
40 | download ${PKGSRC}: | |
41 | rm -rf ${PKGDIR} ${PKGSRC} | |
42 | git clone git://github.com/lxc/cgmanager | |
43 | tar czf ${PKGSRC}.tmp ${PKGDIR} | |
44 | mv ${PKGSRC}.tmp ${PKGSRC} | |
45 | ||
46 | .PHONY: upload | |
47 | upload: ${DEBS} | |
48 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw | |
49 | mkdir -p /pve/${RELEASE}/extra | |
50 | rm -rf /pve/${RELEASE}/extra/lib${PACKAGE}-dev_*.deb | |
51 | rm -rf /pve/${RELEASE}/extra/lib${PACKAGE}0_*.deb | |
52 | rm -rf /pve/${RELEASE}/extra/${PACKAGE}_*.deb | |
53 | rm -rf /pve/${RELEASE}/extra/Packages* | |
54 | cp ${DEBS} /pve/${RELEASE}/extra | |
55 | cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz | |
56 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro | |
57 | ||
58 | .PHONY: clean | |
59 | clean: | |
60 | rm -rf *~ *_${ARCH}.deb *_all.deb *_${ARCH}.udeb *.changes *.dsc ${PKGDIR} |