allow expire to be undefined
[pve-access-control.git] / Makefile
CommitLineData
2c3a6c0a
DM
1RELEASE=2.0
2
3VERSION=1.0
4PACKAGE=libpve-access-control
5PKGREL=1
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}:
37 rm -rf debian
38 mkdir debian
39 make DESTDIR=${CURDIR}/debian install
40 install -d -m 0755 debian/DEBIAN
41 sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ <control.in >debian/DEBIAN/control
42 install -D -m 0644 copyright debian/${DOCDIR}/${PACKAGE}/copyright
43 install -m 0644 changelog.Debian debian/${DOCDIR}/${PACKAGE}/
44 gzip -9 debian/${DOCDIR}/${PACKAGE}/changelog.Debian
45 install -m 0644 ChangeLog debian/${DOCDIR}/${PACKAGE}/changelog
46 gzip -9 debian/${DOCDIR}/${PACKAGE}/changelog
47 dpkg-deb --build debian
48 mv debian.deb ${DEB}
49 #rm -rf debian
50 lintian ${DEB}
51
52.PHONY: upload
53upload: ${DEB}
54 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
55 mkdir -p /pve/${RELEASE}/extra
56 rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
57 rm -f /pve/${RELEASE}/extra/Packages*
58 cp ${DEB} /pve/${RELEASE}/extra
59 cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
60 umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
61
62.PHONY: clean
63clean:
64 rm -rf debian *~ *.deb ${PACKAGE}-*.tar.gz
65 find . -name '*~' -exec rm {} ';'
66
67.PHONY: distclean
68distclean: clean