correctly catch EINTR
[pve-access-control.git] / Makefile
CommitLineData
2c3a6c0a
DM
1RELEASE=2.0
2
3VERSION=1.0
4PACKAGE=libpve-access-control
5bf71a96 5PKGREL=2
2c3a6c0a
DM
6
7DESTDIR=
8PREFIX=/usr
9BINDIR=${PREFIX}/bin
10SBINDIR=${PREFIX}/sbin
11MANDIR=${PREFIX}/share/man
12DOCDIR=${PREFIX}/share/doc
13MAN1DIR=${MANDIR}/man1/
14export PERLDIR=${PREFIX}/share/perl5
15
16ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
17DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
18
19all: ${DEB}
20
21.PHONY: dinstall
22dinstall: deb
23 dpkg -i ${DEB}
24
25.PHONY: install
26install:
27 install -d ${DESTDIR}${BINDIR}
28 install -d ${DESTDIR}${SBINDIR}
29 install -m 0755 pveum ${DESTDIR}${SBINDIR}
30 make -C PVE install
31 perl -I. ./pveum verifyapi
32 install -d ${DESTDIR}/usr/share/man/man1
33 pod2man -n pveum -s 1 -r "proxmox 2.0" -c "Proxmox Documentation" <pveum | gzip -9 > ${DESTDIR}/usr/share/man/man1/pveum.1.gz
34
35.PHONY: deb ${DEB}
36deb ${DEB}:
151acc1f
DM
37 rm -rf build
38 mkdir build
39 make DESTDIR=`pwd`/build install
40 install -d -m 0755 build/DEBIAN
41 sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ <control.in >build/DEBIAN/control
42 install -D -m 0644 copyright build/${DOCDIR}/${PACKAGE}/copyright
43 install -m 0644 changelog.Debian build/${DOCDIR}/${PACKAGE}/
44 gzip -9 build/${DOCDIR}/${PACKAGE}/changelog.Debian
151acc1f
DM
45 dpkg-deb --build build
46 mv build.deb ${DEB}
47 #rm -rf build
2c3a6c0a
DM
48 lintian ${DEB}
49
50.PHONY: upload
51upload: ${DEB}
52 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
53 mkdir -p /pve/${RELEASE}/extra
54 rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
55 rm -f /pve/${RELEASE}/extra/Packages*
56 cp ${DEB} /pve/${RELEASE}/extra
57 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
58 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
59
60.PHONY: clean
61clean:
151acc1f 62 rm -rf build *~ *.deb ${PACKAGE}-*.tar.gz
2c3a6c0a
DM
63 find . -name '*~' -exec rm {} ';'
64
65.PHONY: distclean
66distclean: clean