mirror of
https://git.proxmox.com/git/proxmox-archive-keyring
synced 2025-08-07 06:46:45 +00:00
buildsys: make build-dir generation atomic
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
b581e5ce13
commit
0a741483f4
23
Makefile
23
Makefile
@ -1,22 +1,24 @@
|
|||||||
include /usr/share/dpkg/pkg-info.mk
|
include /usr/share/dpkg/pkg-info.mk
|
||||||
|
|
||||||
PACKAGE=proxmox-archive-keyring
|
PACKAGE=proxmox-archive-keyring
|
||||||
|
BUILDDIR=$(PACKAGE)-$(DEB_VERSION_UPSTREAM)
|
||||||
|
|
||||||
GITVERSION:=$(shell git rev-parse HEAD)
|
GITVERSION:=$(shell git rev-parse HEAD)
|
||||||
|
|
||||||
DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
|
DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
|
||||||
|
|
||||||
BUILD_DIR=build
|
|
||||||
|
|
||||||
all: deb
|
all: deb
|
||||||
deb: $(DEB)
|
|
||||||
|
|
||||||
$(DEB): debian
|
$(BUILDDIR):
|
||||||
rm -rf $(BUILD_DIR)
|
rm -rf $@ $@.tmp
|
||||||
mkdir -p $(BUILD_DIR)/debian
|
mkdir -p $@.tmp/debian
|
||||||
cp -ar debian/* $(BUILD_DIR)/debian/
|
cp -ar debian/* $@.tmp/debian/
|
||||||
echo "git clone git://git.proxmox.com/git/proxmox-archive-keyring.git\\ngit checkout $(GITVERSION)" > $(BUILD_DIR)/debian/SOURCE
|
echo "git clone git://git.proxmox.com/git/proxmox-archive-keyring.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
|
||||||
cd $(BUILD_DIR); dpkg-buildpackage -b -uc -us
|
mv $@.tmp $@
|
||||||
|
|
||||||
|
deb: $(DEB)
|
||||||
|
$(DEB): $(BUILDDIR)
|
||||||
|
cd $(BUILDDIR); dpkg-buildpackage -b -uc -us
|
||||||
lintian $(DEB)
|
lintian $(DEB)
|
||||||
|
|
||||||
.PHONY: upload
|
.PHONY: upload
|
||||||
@ -28,4 +30,5 @@ distclean: clean
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf *~ $(BUILD_DIR) *.deb *.dsc *.changes *.buildinfo
|
rm -rf $(PACKAGE)-[0-9]*/
|
||||||
|
rm -f $(PACKAGE)*.tar* *.deb *.dsc *.changes *.build *.buildinfo
|
||||||
|
Loading…
Reference in New Issue
Block a user