generate and install perl package files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
3d447c9762
commit
9fcecb2c8f
7
.gitignore
vendored
7
.gitignore
vendored
@ -3,5 +3,8 @@
|
||||
/build
|
||||
Cargo.lock
|
||||
/test.pl
|
||||
/PVE
|
||||
/PMG
|
||||
/perl/PVE
|
||||
/perl/PMG
|
||||
/perl/Proxmox/Lib/PMG.pm
|
||||
/perl/Proxmox/Lib/PVE.pm
|
||||
/perl/Proxmox/RS
|
||||
|
@ -1,5 +1,5 @@
|
||||
[workspace]
|
||||
exclude = [ "build", "common-src", "perl" ]
|
||||
exclude = [ "build", "common-src", "perl", "scripts" ]
|
||||
members = [
|
||||
"pve-rs",
|
||||
"pmg-rs",
|
||||
|
40
Makefile
40
Makefile
@ -6,8 +6,20 @@ endef
|
||||
|
||||
ifeq ($(BUILD_MODE), release)
|
||||
CARGO_BUILD_ARGS += --release
|
||||
DEBUG_LIBPATH :=
|
||||
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
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
ifeq ($(BUILD_TARGET), pve)
|
||||
@ -23,14 +35,38 @@ pve pmg:
|
||||
@PERLMOD_PRODUCT=$(call to_upper,$@) \
|
||||
$(CARGO) build $(CARGO_BUILD_ARGS) -p $@-rs
|
||||
|
||||
.PHONY: gen
|
||||
gen:
|
||||
$(call package_template,PMG,pmg_rs)
|
||||
$(call package_template,PVE,pve_rs)
|
||||
perl ./scripts/genpackage.pl Common Proxmox::RS::CalendarEvent
|
||||
perl ./scripts/genpackage.pl PVE \
|
||||
PVE::RS::APT::Repositories \
|
||||
PVE::RS::OpenId \
|
||||
PVE::RS::TFA
|
||||
perl ./scripts/genpackage.pl PMG \
|
||||
PMG::RS::APT::Repositories \
|
||||
PMG::RS::Acme \
|
||||
PMG::RS::CSR \
|
||||
PMG::RS::OpenId \
|
||||
PMG::RS::TFA
|
||||
|
||||
build:
|
||||
rm -rf build
|
||||
mkdir build
|
||||
echo system >build/rust-toolchain
|
||||
cp -a ./scripts ./build
|
||||
cp -a ./common-src ./build
|
||||
cp -a ./pve-rs ./build
|
||||
cp -a ./pmg-rs ./build
|
||||
cp -a ./perl ./build/pve-rs
|
||||
cp -a ./perl ./build/pmg-rs
|
||||
cp -a ./Proxmox ./build
|
||||
$(MAKE) BUILD_MODE=release -C build -f ../Makefile gen
|
||||
mkdir -p ./build/pve-rs/Proxmox/Lib
|
||||
mv ./build/Proxmox/Lib/PVE.pm ./build/pve-rs/Proxmox/Lib/PVE.pm
|
||||
mkdir -p ./build/pmg-rs/Proxmox/Lib
|
||||
mv ./build/Proxmox/Lib/PMG.pm ./build/pmg-rs/Proxmox/Lib/PMG.pm
|
||||
mv ./build/PVE ./build/pve-rs
|
||||
mv ./build/PMG ./build/pmg-rs
|
||||
|
||||
pve-deb: build
|
||||
cd ./build/pve-rs && dpkg-buildpackage -b -uc -us
|
||||
|
@ -15,9 +15,11 @@ DEBS=$(MAIN_DEB) $(DBGSYM_DEB)
|
||||
DESTDIR=
|
||||
|
||||
PM_DIRS := \
|
||||
Proxmox/Lib \
|
||||
PMG/RS/APT
|
||||
|
||||
PM_FILES := \
|
||||
Proxmox/Lib/PVE.pm \
|
||||
PMG/RS/APT/Repositories.pm \
|
||||
PMG/RS/Acme.pm \
|
||||
PMG/RS/CSR.pm \
|
||||
|
@ -16,9 +16,11 @@ DEBS=$(MAIN_DEB) $(DBGSYM_DEB)
|
||||
DESTDIR=
|
||||
|
||||
PM_DIRS := \
|
||||
Proxmox/Lib \
|
||||
PVE/RS/APT
|
||||
|
||||
PM_FILES := \
|
||||
Proxmox/Lib/PVE.pm \
|
||||
PVE/RS/APT/Repositories.pm \
|
||||
PVE/RS/CalendarEvent.pm \
|
||||
PVE/RS/OpenId.pm \
|
||||
|
Loading…
Reference in New Issue
Block a user