]>
Commit | Line | Data |
---|---|---|
70e0da62 DM |
1 | RELEASE=4.0 |
2 | ||
9108d962 DM |
3 | PACKAGE=lxc |
4 | LXCVER=1.1.1 | |
5 | DEBREL=1 | |
70e0da62 | 6 | |
9108d962 | 7 | SRCDIR=${PACKAGE} |
70e0da62 DM |
8 | SRCTAR=${SRCDIR}.tgz |
9 | ||
9108d962 DM |
10 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
11 | GITVERSION:=$(shell cat .git/refs/heads/master) | |
70e0da62 | 12 | |
9108d962 DM |
13 | DEBS= \ |
14 | ${PACKAGE}_${LXCVER}-${DEBREL}_amd64.deb \ | |
15 | ${PACKAGE}-dbg_${LXCVER}-${DEBREL}_amd64.deb | |
70e0da62 | 16 | |
9108d962 DM |
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/lxc.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE | |
25 | cd ${SRCDIR}; dpkg-buildpackage -rfakeroot -b -us -uc | |
26 | lintian ${DEBS} | |
27 | ||
28 | ||
29 | .PHONY: download | |
70e0da62 DM |
30 | download ${SRCTAR}: |
31 | rm -rf ${SRCDIR} ${SRCTAR} | |
32 | git clone git://github.com/lxc/lxc | |
33 | tar czf ${SRCTAR}.tmp ${SRCDIR} | |
34 | mv ${SRCTAR}.tmp ${SRCTAR} | |
35 | ||
9108d962 DM |
36 | .PHONY: upload |
37 | upload: ${DEBS} | |
38 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw | |
39 | mkdir -p /pve/${RELEASE}/extra | |
40 | rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb | |
41 | rm -f /pve/${RELEASE}/extra/${PACKAGE}-dbg_*.deb | |
42 | rm -f /pve/${RELEASE}/extra/Packages* | |
43 | cp ${DEBS} /pve/${RELEASE}/extra | |
44 | cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz | |
45 | umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro | |
46 | ||
70e0da62 DM |
47 | distclean: clean |
48 | ||
49 | .PHONY: clean | |
50 | clean: | |
9108d962 | 51 | rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc |
70e0da62 | 52 | find . -name '*~' -exec rm {} ';' |
9108d962 DM |
53 | |
54 | .PHONY: dinstall | |
55 | dinstall: ${DEBS} | |
56 | dpkg -i ${DEBS} |