5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-10 09:17:37 +03:00
pve-common/Makefile
2016-01-08 12:51:16 +01:00

58 lines
1.2 KiB
Makefile

RELEASE=4.1
VERSION=4.0
PKGREL=43
PACKAGE=libpve-common-perl
PREFIX=/usr
BINDIR=${PREFIX}/bin
MANDIR=${PREFIX}/share/man
DOCDIR=${PREFIX}/share/doc
MAN1DIR=${MANDIR}/man1/
PERLDIR=${PREFIX}/share/perl5
ARCH=all
GITVERSION:=$(shell cat .git/refs/heads/master)
DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
all: ${DEB}
.PHONY: dinstall
dinstall: deb
dpkg -i ${DEB}
.PHONY: deb
deb ${DEB}:
$(MAKE) -C test check
rm -rf build
rsync -a src/ build
rsync -a debian/ build/debian
echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
cd build; dpkg-buildpackage -rfakeroot -b -us -uc
lintian ${DEB}
.PHONY: clean
clean:
rm -rf *~ *.deb *.changes build ${PACKAGE}-*.tar.gz
.PHONY: distclean
distclean: clean
.PHONY: check
check:
$(MAKE) -C test check
.PHONY: upload
upload: ${DEB}
umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
mkdir -p /pve/${RELEASE}/extra
rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
rm -f /pve/${RELEASE}/extra/Packages*
cp ${DEB} /pve/${RELEASE}/extra
cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro