buildsys: generate .pm files in packages
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
6b2814d612
commit
6583f4d840
21
Makefile
21
Makefile
@ -33,24 +33,6 @@ endif
|
||||
pve pmg:
|
||||
$(CARGO) build $(CARGO_BUILD_ARGS) -p $@-rs
|
||||
|
||||
.PHONY: gen
|
||||
gen:
|
||||
perl ./scripts/genpackage.pl Common \
|
||||
Proxmox::RS::APT::Repositories \
|
||||
Proxmox::RS::CalendarEvent \
|
||||
Proxmox::RS::Subscription
|
||||
perl ./scripts/genpackage.pl PVE \
|
||||
PVE::RS::APT::Repositories \
|
||||
PVE::RS::OpenId \
|
||||
PVE::RS::ResourceScheduling::Static \
|
||||
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
|
||||
@ -61,9 +43,6 @@ build:
|
||||
cp -a ./pmg-rs ./build
|
||||
cp -a ./Proxmox ./build
|
||||
cp defines.mk ./build
|
||||
$(MAKE) BUILD_MODE=release -C build -f ../Makefile gen
|
||||
mv ./build/PVE ./build/pve-rs
|
||||
mv ./build/PMG ./build/pmg-rs
|
||||
mv ./build/Proxmox ./build/common/pkg
|
||||
# The template.pm is required by the products to produce their Proxmox::Lib
|
||||
mkdir ./build/Proxmox
|
||||
|
@ -12,11 +12,18 @@ DEB=${PACKAGE}_${DEB_VERSION}_${ARCH}.deb
|
||||
|
||||
DESTDIR=
|
||||
|
||||
all:
|
||||
# Point to any generated pm file (Proxmox/ dir is already present in this package)
|
||||
Proxmox/RS/CalendarEvent.pm: ../scripts/genpackage.pl
|
||||
perl ../scripts/genpackage.pl Common \
|
||||
Proxmox::RS::APT::Repositories \
|
||||
Proxmox::RS::CalendarEvent \
|
||||
Proxmox::RS::Subscription
|
||||
|
||||
all: Proxmox/RS/CalendarEvent.pm
|
||||
true
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
install: Proxmox/RS/CalendarEvent.pm
|
||||
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
||||
find PVE \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';'
|
||||
find Proxmox \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';'
|
||||
|
1
common/scripts
Symbolic link
1
common/scripts
Symbolic link
@ -0,0 +1 @@
|
||||
../scripts
|
@ -26,6 +26,14 @@ ifneq ($(BUILD_MODE), skip)
|
||||
cargo build $(CARGO_BUILD_ARGS)
|
||||
endif
|
||||
|
||||
PMG: ../scripts/genpackage.pl
|
||||
perl ../scripts/genpackage.pl PMG \
|
||||
PMG::RS::APT::Repositories \
|
||||
PMG::RS::Acme \
|
||||
PMG::RS::CSR \
|
||||
PMG::RS::OpenId \
|
||||
PMG::RS::TFA
|
||||
|
||||
Proxmox/Lib/PMG.pm: ../Proxmox/Lib/template.pm
|
||||
mkdir -p Proxmox/Lib
|
||||
$(call package_template,PMG,pmg_rs,../)
|
||||
@ -39,7 +47,7 @@ build:
|
||||
rsync -a debian Makefile Cargo.toml Cargo.lock src target PMG build/
|
||||
|
||||
.PHONY: install
|
||||
install: target/release/libpmg_rs.so Proxmox/Lib/PMG.pm
|
||||
install: target/release/libpmg_rs.so Proxmox/Lib/PMG.pm PMG
|
||||
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto
|
||||
install -m644 target/release/libpmg_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpmg_rs.so
|
||||
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
||||
|
@ -22,11 +22,18 @@ ifeq ($(BUILD_MODE), release)
|
||||
CARGO_BUILD_ARGS += --release
|
||||
endif
|
||||
|
||||
all: Proxmox/Lib/PVE.pm
|
||||
all: PVE Proxmox/Lib/PVE.pm
|
||||
ifneq ($(BUILD_MODE), skip)
|
||||
cargo build $(CARGO_BUILD_ARGS)
|
||||
endif
|
||||
|
||||
PVE: ../scripts/genpackage.pl
|
||||
perl ../scripts/genpackage.pl PVE \
|
||||
PVE::RS::APT::Repositories \
|
||||
PVE::RS::OpenId \
|
||||
PVE::RS::ResourceScheduling::Static \
|
||||
PVE::RS::TFA
|
||||
|
||||
Proxmox/Lib/PVE.pm: ../Proxmox/Lib/template.pm
|
||||
mkdir -p Proxmox/Lib
|
||||
$(call package_template,PVE,pve_rs,../)
|
||||
@ -40,7 +47,7 @@ build:
|
||||
rsync -a debian Makefile Cargo.toml Cargo.lock src target PVE build/
|
||||
|
||||
.PHONY: install
|
||||
install: target/release/libpve_rs.so Proxmox/Lib/PVE.pm
|
||||
install: target/release/libpve_rs.so Proxmox/Lib/PVE.pm PVE
|
||||
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto
|
||||
install -m644 target/release/libpve_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpve_rs.so
|
||||
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
||||
|
Loading…
Reference in New Issue
Block a user