GITVERSION:=$(shell git rev-parse HEAD)
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
+
DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
all: $(DEB)
+$(BUILDDIR): src debian
+ rm -rf $(BUILDDIR)
+ rsync -a src/ debian $(BUILDDIR)
+ echo "git clone git://git.proxmox.com/git/proxmox-mini-journal\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
+
.PHONY: deb
deb: $(DEB)
-$(DEB):
- rm -rf build
- rsync -a ./src/* build/
- rsync -a ./debian build/
- echo "git clone git://git.proxmox.com/git/pve-journalreader.git\\ngit checkout $(GITVERSION)" > build/debian/SOURCE
- cd build; dpkg-buildpackage -b -us -uc
+$(DEB): $(BUILDDIR)
+ cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
lintian $(DEB)
dinstall: $(DEB)
.PHONY: clean
clean:
- rm -rf build/ *.deb *.buildinfo *.changes
+ rm -rf $(BUILDDIR) *.deb *.buildinfo *.changes