.PHONY: install
install: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
$(MAKE) -C banner install
+ $(MAKE) -C Proxmox install
install -D -m 644 interfaces ${DESTDIR}/etc/network/interfaces
install -D -m 755 fake-start-stop-daemon ${VARLIBDIR}/fake-start-stop-daemon
install -D -m 755 policy-disable-rc.d $(VARLIBDIR)/policy-disable-rc.d
--- /dev/null
+package Proxmox::Install::Setup;
+
+use strict;
+use warnings;
+
+my $product_cfg = {
+ pve => {
+ fullname => 'Proxmox VE',
+ port => '8006',
+ enable_btrfs => 1,
+ bridged_network => 1,
+ },
+ pmg => {
+ fullname => 'Proxmox Mail Gateway',
+ port => '8006',
+ enable_btrfs => 0,
+ bridged_network => 0,
+ },
+ pbs => {
+ fullname => 'Proxmox Backup Server',
+ port => '8007',
+ enable_btrfs => 0,
+ bridged_network => 0,
+ },
+};
+
+sub setup {
+ my $cd_info = get_cd_info();
+ my $product = $cd_info->{product};
+
+ my $setup_info = $product_cfg->{$product};
+ die "unknown product '$product'\n" if !$setup_info;
+
+ $setup_info->{product} = $product;
+
+ return ($setup_info, $cd_info);
+}
+
+sub get_cd_info {
+ my $info_fn = '/.cd-info'; # default place in the ISO environment
+ if (!-f $info_fn && -f "cd-info.test") {
+ $info_fn = "cd-info.test"; # use from CWD for test mode
+ }
+
+ open(my $fh, '<', $info_fn) or die "Could not open CD info file '$info_fn' $!";
+
+ my $cd_info = {};
+ while (my $line = <$fh>) {
+ chomp $line;
+ if ($line =~ /^(\S+)=['"]?(.+?)['"]?$/) { # we control cd-info content, so good enough.
+ $cd_info->{lc($1)} = $2;
+ }
+ }
+ close ($fh);
+
+ die "CD-info is missing required key 'product'!\n" if !defined $cd_info->{product};
+
+ return $cd_info;
+}
+
+1;
--- /dev/null
+all:
+
+DESTDIR=
+VARLIBDIR=$(DESTDIR)/var/lib/proxmox-installer
+PERL5DIR=$(DESTDIR)/usr/share/perl5/Proxmox
+
+#PERL_MODULES=$(shell git ls-files . | grep '.pm$')
+PERL_MODULES=\
+ Install/Setup.pm \
+
+.PHONY: install
+install: $(PERL_MODULES)
+ for f in $(PERL_MODULES); \
+ do install -D -m 644 "$$f" "$(PERL5DIR)/$$f"; \
+ done
+
+.PHONY: clean
+clean:
+++ /dev/null
-package ProxmoxInstallerSetup;
-
-use strict;
-use warnings;
-
-my $product_cfg = {
- pve => {
- fullname => 'Proxmox VE',
- port => '8006',
- enable_btrfs => 1,
- bridged_network => 1,
- },
- pmg => {
- fullname => 'Proxmox Mail Gateway',
- port => '8006',
- enable_btrfs => 0,
- bridged_network => 0,
- },
- pbs => {
- fullname => 'Proxmox Backup Server',
- port => '8007',
- enable_btrfs => 0,
- bridged_network => 0,
- },
-};
-
-sub setup {
- my $cd_info = get_cd_info();
- my $product = $cd_info->{product};
-
- my $setup_info = $product_cfg->{$product};
- die "unknown product '$product'\n" if !$setup_info;
-
- $setup_info->{product} = $product;
-
- return ($setup_info, $cd_info);
-}
-
-sub get_cd_info {
- my $info_fn = '/.cd-info'; # default place in the ISO environment
- if (!-f $info_fn && -f "cd-info.test") {
- $info_fn = "cd-info.test"; # use from CWD for test mode
- }
-
- open(my $fh, '<', $info_fn) or die "Could not open CD info file '$info_fn' $!";
-
- my $cd_info = {};
- while (my $line = <$fh>) {
- chomp $line;
- if ($line =~ /^(\S+)=['"]?(.+?)['"]?$/) { # we control cd-info content, so good enough.
- $cd_info->{lc($1)} = $2;
- }
- }
- close ($fh);
-
- die "CD-info is missing required key 'product'!\n" if !defined $cd_info->{product};
-
- return $cd_info;
-}
-
-1;
#DH_VERBOSE = 1
-SETUPFN = "/usr/share/perl5/ProxmoxInstallerSetup.pm"
-
%:
dh $@
-# FIXME: could all be in d/install or in makefile?!
-override_dh_auto_install:
- install -D -m 0644 ProxmoxInstallerSetup.pm $(CURDIR)/debian/proxmox-installer/${SETUPFN}
- dh_auto_install --destdir debian/proxmox-installer
-
override_dh_missing:
dh_missing --fail-missing
use Time::HiRes;
use POSIX ":sys_wait_h";
-use ProxmoxInstallerSetup;
+use Proxmox::Install::Setup;
if (!$ENV{G_SLICE} || $ENV{G_SLICE} ne "always-malloc") {
die "do not use slice allocator (run with 'G_SLICE=always-malloc ./proxinstall ...')\n";
$ENV{'LVM_SUPPRESS_FD_WARNINGS'} = '1';
-my ($setup, $cd_info) = ProxmoxInstallerSetup::setup();
+my ($setup, $cd_info) = Proxmox::Install::Setup::setup();
my $zfstestpool = "test_rpool";
my $zfspoolname = $opt_testmode ? $zfstestpool : 'rpool';