5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-11 13:17:36 +03:00
pve-common/Makefile

51 lines
989 B
Makefile

RELEASE=2.0
VERSION=1.0
PKGREL=23
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
DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
all: ${DEB}
.PHONY: dinstall
dinstall: deb
dpkg -i ${DEB}
.PHONY: deb
deb ${DEB}:
rm -rf build
rsync -a data/ build
rsync -a debian/ build/debian
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: 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