]> git.proxmox.com Git - vzctl.git/blob - Makefile
add .gitignore file
[vzctl.git] / Makefile
1 RELEASE=2.0
2
3 SVER=3.0.29
4 PACKAGERELEASE=2pve1
5 ARCH=amd64
6
7 PACKAGE=vzctl
8 DEB=${PACKAGE}_${SVER}-${PACKAGERELEASE}_${ARCH}.deb
9
10 VZCTL_BRANCH=vzctl-3.0.29.2
11
12 all: ${DEB}
13
14 vzctl-${SVER}.org/COPYING: vzctl-${SVER}.org.tgz
15 tar xzf $<
16 touch $@
17
18 .PHONY: download
19 vzctl-${SVER}.org.tgz download:
20 rm -rf vzctl-${SVER}.org vzctl-${SVER}.org.tgz
21 git clone git://git.openvz.org/pub/vzctl vzctl-${SVER}.org
22 cd vzctl-${SVER}.org; git branch ${VZCTL_BRANCH}
23 tar czf vzctl-${SVER}.org.tgz vzctl-${SVER}.org
24
25
26 vzctl-${SVER}/debian/control: vzctl-${SVER}.org/COPYING
27 rm -rf vzctl-${SVER}
28 rsync -av vzctl-${SVER}.org/ vzctl-${SVER}
29 rsync -av --exclude .svn debian/ vzctl-${SVER}/debian
30 cd vzctl-${SVER}; ./autogen.sh
31 touch $@
32
33
34 .PHONY: deb
35 ${DEB} deb: vzctl-${SVER}/debian/control
36 chmod +x vzctl-${SVER}/debian/rules
37 cd vzctl-${SVER}; dpkg-buildpackage -b -rfakeroot -us -uc
38 lintian ${DEB}
39
40 .PHONY: upload
41 upload: vzctl-${SVER}.tgz ${DEB}
42 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
43 mkdir -p /pve/${RELEASE}/extra
44 rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
45 rm -f /pve/${RELEASE}/install/vzctl-*.tgz
46 rm -f /pve/${RELEASE}/extra/Packages*
47 cp ${DEB} /pve/${RELEASE}/extra
48 cp vzctl-${SVER}.tgz /pve/${RELEASE}/install
49 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
50 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
51
52 .PHONY: distclean
53 distclean: clean
54 rm -rf vzctl-${SVER}.tgz vzctl-${SVER}.org
55
56 .PHONY: clean
57 clean:
58 rm -rf vzctl-${SVER} vzctl_${SVER}* *~ debian/*~ debian/patches/*~ *.tmp a.out
59
60 .PHONY: dinstall
61 dinstall: deb
62 dpkg -i ${DEB}
63