add upload make target
[vzquota.git] / Makefile
1 RELEASE=2.2
2
3 # wget http://download.openvz.org/utils/vzquota/3.1/src/vzquota-3.1.tar.bz2
4
5 PACKAGE=vzquota
6 PKGVER=3.1
7 PACKAGERELEASE=1
8
9 ARCH=amd64
10 DEB=${PACKAGE}_${PKGVER}-${PACKAGERELEASE}_${ARCH}.deb
11
12 SRCDIR=vzquota-${PKGVER}
13 SRC=${SRCDIR}.tar.bz2
14
15 all: ${DEB}
16
17 ${DEB}: ${SRC}
18         rm -rf ${SRCDIR}
19         tar xf ${SRC}
20         cp -a debian ${SRCDIR}
21         cd ${SRCDIR}; dpkg-buildpackage -b -rfakeroot -us -uc
22         lintian ${DEB}
23
24
25 .PHONY: upload
26 upload: ${DEB}
27         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw 
28         mkdir -p /pve/${RELEASE}/extra
29         rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
30         rm -f /pve/${RELEASE}/extra/Packages*
31         cp ${DEB} /pve/${RELEASE}/extra
32         cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
33         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
34
35 .PHONY: distclean
36 distclean: clean
37
38 .PHONY: clean
39 clean:
40         rm -rf *~ debian/*~ ${SRCDIR} ${PACKAGE}_*.deb ${PACKAGE}_*.changes
41