mirror of
https://git.proxmox.com/git/proxmox-perl-rs
synced 2025-05-23 21:40:23 +00:00
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:
|
pve pmg:
|
||||||
$(CARGO) build $(CARGO_BUILD_ARGS) -p $@-rs
|
$(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:
|
build:
|
||||||
rm -rf build
|
rm -rf build
|
||||||
mkdir build
|
mkdir build
|
||||||
@ -61,9 +43,6 @@ build:
|
|||||||
cp -a ./pmg-rs ./build
|
cp -a ./pmg-rs ./build
|
||||||
cp -a ./Proxmox ./build
|
cp -a ./Proxmox ./build
|
||||||
cp defines.mk ./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
|
mv ./build/Proxmox ./build/common/pkg
|
||||||
# The template.pm is required by the products to produce their Proxmox::Lib
|
# The template.pm is required by the products to produce their Proxmox::Lib
|
||||||
mkdir ./build/Proxmox
|
mkdir ./build/Proxmox
|
||||||
|
@ -12,11 +12,18 @@ DEB=${PACKAGE}_${DEB_VERSION}_${ARCH}.deb
|
|||||||
|
|
||||||
DESTDIR=
|
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
|
true
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install:
|
install: Proxmox/RS/CalendarEvent.pm
|
||||||
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
||||||
find PVE \! -type d -print -exec install -Dm644 '{}' $(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)'/{}' ';'
|
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)
|
cargo build $(CARGO_BUILD_ARGS)
|
||||||
endif
|
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
|
Proxmox/Lib/PMG.pm: ../Proxmox/Lib/template.pm
|
||||||
mkdir -p Proxmox/Lib
|
mkdir -p Proxmox/Lib
|
||||||
$(call package_template,PMG,pmg_rs,../)
|
$(call package_template,PMG,pmg_rs,../)
|
||||||
@ -39,7 +47,7 @@ build:
|
|||||||
rsync -a debian Makefile Cargo.toml Cargo.lock src target PMG build/
|
rsync -a debian Makefile Cargo.toml Cargo.lock src target PMG build/
|
||||||
|
|
||||||
.PHONY: install
|
.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 -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto
|
||||||
install -m644 target/release/libpmg_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpmg_rs.so
|
install -m644 target/release/libpmg_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpmg_rs.so
|
||||||
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
||||||
|
@ -22,11 +22,18 @@ ifeq ($(BUILD_MODE), release)
|
|||||||
CARGO_BUILD_ARGS += --release
|
CARGO_BUILD_ARGS += --release
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: Proxmox/Lib/PVE.pm
|
all: PVE Proxmox/Lib/PVE.pm
|
||||||
ifneq ($(BUILD_MODE), skip)
|
ifneq ($(BUILD_MODE), skip)
|
||||||
cargo build $(CARGO_BUILD_ARGS)
|
cargo build $(CARGO_BUILD_ARGS)
|
||||||
endif
|
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
|
Proxmox/Lib/PVE.pm: ../Proxmox/Lib/template.pm
|
||||||
mkdir -p Proxmox/Lib
|
mkdir -p Proxmox/Lib
|
||||||
$(call package_template,PVE,pve_rs,../)
|
$(call package_template,PVE,pve_rs,../)
|
||||||
@ -40,7 +47,7 @@ build:
|
|||||||
rsync -a debian Makefile Cargo.toml Cargo.lock src target PVE build/
|
rsync -a debian Makefile Cargo.toml Cargo.lock src target PVE build/
|
||||||
|
|
||||||
.PHONY: install
|
.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 -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto
|
||||||
install -m644 target/release/libpve_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpve_rs.so
|
install -m644 target/release/libpve_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpve_rs.so
|
||||||
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
||||||
|
Loading…
Reference in New Issue
Block a user