buildsys: move package_template to defines.mk

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-11-15 13:05:50 +01:00
parent b5ca6876d3
commit 3c86999734
2 changed files with 10 additions and 9 deletions

View File

@ -1,3 +1,5 @@
include defines.mk
CARGO ?= cargo
ifeq ($(BUILD_MODE), release)
@ -7,15 +9,6 @@ else
DEBUG_LIBPATH := "-L./target/debug",
endif
define package_template
sed -r \
-e 's/\{\{PRODUCT\}\}/$(1)/g;' \
-e 's/\{\{LIBRARY\}\}/$(2)/g;' \
-e 's|\{\{DEBUG_LIBPATH\}\}|$(DEBUG_LIBPATH)|g;' \
Proxmox/Lib/template.pm \
>Proxmox/Lib/$(1).pm
endef
define upload_template
cd build; \
dcmd --deb lib$(1)-rs-perl*.changes \

8
defines.mk Normal file
View File

@ -0,0 +1,8 @@
define package_template
sed -r \
-e 's/\{\{PRODUCT\}\}/$(1)/g;' \
-e 's/\{\{LIBRARY\}\}/$(2)/g;' \
-e 's|\{\{DEBUG_LIBPATH\}\}|$(DEBUG_LIBPATH)|g;' \
Proxmox/Lib/template.pm \
>Proxmox/Lib/$(1).pm
endef