mirror of
git://git.proxmox.com/git/pve-firewall.git
synced 2025-01-09 01:18:04 +03:00
61 lines
1.3 KiB
Makefile
61 lines
1.3 KiB
Makefile
RELEASE=4.2
|
|
|
|
VERSION=2.0
|
|
PKGREL=27
|
|
|
|
PACKAGE=pve-firewall
|
|
|
|
PREFIX=/usr
|
|
BINDIR=${PREFIX}/bin
|
|
SBINDIR=${PREFIX}/sbin
|
|
MANDIR=${PREFIX}/share/man
|
|
DOCDIR=${PREFIX}/share/doc
|
|
MAN1DIR=${MANDIR}/man1/
|
|
PERLDIR=${PREFIX}/share/perl5
|
|
|
|
ARCH=amd64
|
|
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}: check
|
|
rm -rf build
|
|
rsync -a src/ build
|
|
rsync -a debian/ build/debian
|
|
echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
|
|
# install
|
|
cd build; dpkg-buildpackage -rfakeroot -b -us -uc
|
|
lintian ${DEB}
|
|
|
|
.PHONY: check
|
|
check:
|
|
make -C test check
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
make -C src clean
|
|
make -C test clean
|
|
rm -rf *~ debian/*~ example/*~ *.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
|