add .gitignore file, remove svn leftover
[pve-common.git] / Makefile
1 RELEASE=2.0
2
3 VERSION=1.0
4 PKGREL=5
5
6 PACKAGE=libpve-common-perl
7
8 PREFIX=/usr
9 BINDIR=${PREFIX}/bin
10 MANDIR=${PREFIX}/share/man
11 DOCDIR=${PREFIX}/share/doc
12 MAN1DIR=${MANDIR}/man1/
13 PERLDIR=${PREFIX}/share/perl5
14
15 ARCH=all
16 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
17
18 all: ${DEB}
19
20 .PHONY: dinstall
21 dinstall: deb
22         dpkg -i ${DEB}
23
24
25 .PHONY: deb
26 deb ${DEB}: 
27         rm -rf build
28         rsync -a data/ build
29         rsync -a debian/ build/debian
30         cd build; dpkg-buildpackage -rfakeroot -b -us -uc
31         lintian ${DEB}
32
33 .PHONY: clean
34 clean:  
35         rm -rf *~ *.deb *.changes build ${PACKAGE}-*.tar.gz
36
37 .PHONY: distclean
38 distclean: clean
39
40
41 .PHONY: upload
42 upload: ${DEB}
43         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw 
44         mkdir -p /pve/${RELEASE}/extra
45         rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
46         rm -f /pve/${RELEASE}/extra/Packages*
47         cp ${DEB} /pve/${RELEASE}/extra
48         cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
49         umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
50