]> git.proxmox.com Git - proxmox-i18n.git/commitdiff
buildsys: use source package name derived build directory
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 16 May 2023 15:05:17 +0000 (17:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 16 May 2023 16:09:00 +0000 (18:09 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
.gitignore
Makefile

index 1002a5cd44c6798dc4d3edfdd629998b7cf92d8c..96633ff3271ae03b78122b3f20291e781831b70c 100644 (file)
@@ -1,4 +1,4 @@
-dest/
+/proxmox-i18n*/
 *.deb
 *.buildinfo
 *.changes
@@ -7,3 +7,4 @@ dest/
 /pmg-lang-*.js
 /pve-lang-*.js
 /messages.pot
+/build-debs
index 80e793143963b458077df012468a8ce65755262a..73004faa50ff9960e24c96ffebe5ac47b8a456d3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,8 @@ LINGUAS=\
        zh_CN \
        zh_TW \
 
+BUILDDIR ?= ${DEB_SOURCE}-${DEB_VERSION}
+
 PVE_I18N_DEB=pve-i18n_${DEB_VERSION}_all.deb
 PMG_I18N_DEB=pmg-i18n_${DEB_VERSION}_all.deb
 PBS_I18N_DEB=pbs-i18n_${DEB_VERSION}_all.deb
@@ -43,17 +45,20 @@ PBS_LANG_FILES=$(patsubst %, pbs-lang-%.js, $(LINGUAS))
 
 all:
 
+$(BUILDDIR): submodule
+       rm -rf $@ $@.tmp
+       rsync -a * $@.tmp
+       mv $@.tmp $@
+
 .PHONY: deb
 deb: $(DEBS)
-$(PMG_I18N_DEB): $(PVE_I18N_DEB)
-$(PBS_I18N_DEB): $(PVE_I18N_DEB)
-$(PVE_I18N_DEB): | submodule
-       rm -rf dest
-       rsync -a * dest
-       cd dest; dpkg-buildpackage -b -us -uc
+$(DEBS): build-debs
+
+build-debs: $(BUILDDIR)
+       cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
        lintian $(DEBS)
+       touch "$@"
 
-.PHONY: submodule
 submodule:
        test  -f pmg-gui/Makefile -a -f proxmox-backup/Makefile -a -f pve-manager/Makefile \
            || git submodule update --init
@@ -114,7 +119,7 @@ distclean: clean
 .PHONY: clean
 clean:
        find . -name '*~' -exec rm {} ';'
-       rm -rf dest *.po.tmp *.js.tmp *.deb *.buildinfo *.changes *.js messages.pot
+       rm -rf $(DEB_SOURCE)-[0-9]*/ *.po.tmp *.js.tmp *.deb *.buildinfo *.changes *.js messages.pot
 
 .PHONY: upload-pve upload-pmg upload-pbs upload
 upload-pve: ${PVE_I18N_DEB}