1 include /usr
/share
/dpkg
/default.mk
3 PACKAGE
= proxmox-installer
4 DEB
=$(PACKAGE
)_
$(DEB_VERSION
)_
$(DEB_HOST_ARCH
).deb
7 ifeq ($(BUILD_MODE
), release
)
8 CARGO_BUILD_ARGS
+= --release
9 CARGO_COMPILEDIR
:= target
/release
11 CARGO_COMPILEDIR
:= target
/debug
14 INSTALLER_SOURCES
=$(shell git ls-files
) country.dat
17 BINDIR
= $(PREFIX
)/bin
18 USR_BIN
:= proxmox-tui-installer
21 $(addprefix $(CARGO_COMPILEDIR
)/,$(USR_BIN
))
25 country.dat
: country.pl
26 .
/country.pl
> country.dat.tmp
27 mv country.dat.tmp country.dat
30 ${DEB}: ${INSTALLER_SOURCES}
31 rsync
--exclude
='test*.img' -a
* build
32 cd build
; dpkg-buildpackage
-b
-us
-uc
35 test-
$(DEB
): $(INSTALLER_SOURCES
)
36 rsync
--exclude
='test*.img' -a
* build
37 cd build
; dpkg-buildpackage
-b
-us
-uc
-nc
41 VARLIBDIR
=$(DESTDIR
)/var
/lib
/proxmox-installer
42 HTMLDIR
=$(VARLIBDIR
)/html
/common
45 install: ${INSTALLER_SOURCES} $(CARGO_COMPILEDIR
)/proxmox-tui-installer
46 $(MAKE
) -C banner
install
47 $(MAKE
) -C Proxmox
install
48 install -D
-m
644 interfaces
${DESTDIR}/etc
/network
/interfaces
49 install -D
-m
755 fake-start-stop-daemon
${VARLIBDIR}/fake-start-stop-daemon
50 install -D
-m
755 policy-disable-rc.d
$(VARLIBDIR
)/policy-disable-rc.d
51 install -D
-m
644 country.dat
$(VARLIBDIR
)/country.dat
52 install -D
-m
755 unconfigured.sh
${DESTDIR}/sbin
/unconfigured.sh
53 install -D
-m
755 proxinstall
${DESTDIR}/usr
/bin
/proxinstall
54 install -D
-m
755 proxmox-low-level-installer
$(DESTDIR
)/$(BINDIR
)/proxmox-low-level-installer
55 $(foreach i
,$(USR_BIN
), install -m755
$(CARGO_COMPILEDIR
)/$(i
) $(DESTDIR
)$(BINDIR
)/)
56 install -D
-m
755 checktime
${DESTDIR}/usr
/bin
/checktime
57 install -D
-m
644 xinitrc
${DESTDIR}/.xinitrc
58 install -D
-m
755 spice-vdagent.sh
${DESTDIR}/.spice-vdagent.sh
59 install -D
-m
644 Xdefaults
${DESTDIR}/.Xdefaults
62 $(CARGO
) build
--package proxmox-tui-installer
--bin proxmox-tui-installer
$(CARGO_BUILD_ARGS
)
64 %-banner.png
: %-banner.svg
68 upload
: UPLOAD_DIST ?
= $(DEB_DISTRIBUTION
)
70 tar cf
- ${DEB} | ssh
-X repoman@repo.proxmox.com
-- upload
--product pve
,pmg
,pbs
--dist $(UPLOAD_DIST
)
78 .PHONY
: prepare-check-env
79 prepare-check-env
: test-
$(DEB
)
80 umount
-Rd testdir || true
82 dpkg
-X test-
$(DEB
) testdir
84 cd-info.
test: PRODUCT ?
= pve
86 printf
'%s\n' "PRODUCT='$(or $(PRODUCT), pve)'" >$@.tmp
87 printf
'%s\n' "PRODUCTLONG='$(or $(PRODUCTLONG), Proxmox VE)'" >>$@.tmp
88 printf
'%s\n' "RELEASE='$(or $(RELEASE), 42.1)'" >>$@.tmp
89 printf
'%s\n' "ISORELEASE='$(or $(ISORELEASE), 1)'" >>$@.tmp
90 printf
'%s\n' "ISONAME='$(or $(ISONAME), proxmox-ve)'" >>$@.tmp
93 check-pve
: prepare-check-env
test.img
94 rm -f cd-info.
test; $(MAKE
) cd-info.
test
95 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
97 check-pve-multidisks
: prepare-check-env
test.img test2.img test3.img test4.img test5.big.img
98 rm -f cd-info.
test; $(MAKE
) cd-info.
test
99 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
,test2.img
,test3.img
,test4.img
,test5.big.img
101 check-pve-tui
: prepare-check-env
test.img
102 rm -f cd-info.
test; $(MAKE
) cd-info.
test
103 .
/proxmox-low-level-installer dump-env
-t
104 testdir
/usr
/bin
/proxmox-tui-installer
-t
test.img
106 check-pmg
: prepare-check-env
test.img
107 rm -f cd-info.
test; $(MAKE
) \
109 PRODUCTLONG
="Proxmox Mail Gateway" \
110 ISONAME
='proxmox-mail-gateway' \
112 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
114 check-pbs
: prepare-check-env
test.img
115 rm -f cd-info.
test; $(MAKE
) \
117 PRODUCTLONG
='Proxmox Backup Server' \
118 ISONAME
='proxmox-backup-server' \
120 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
125 umount
-Rd testdir || true
126 rm -rf
*~
*.deb target build packages packages.tmp testdir
test*.img pve-final.pkglist \
127 *.buildinfo
*.changes country.dat final.pkglist cd-info.
test
128 find .
-name
'*~' -exec
rm {} ';'