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
36 VARLIBDIR
=$(DESTDIR
)/var
/lib
/proxmox-installer
37 HTMLDIR
=$(VARLIBDIR
)/html
/common
40 install: ${INSTALLER_SOURCES} $(CARGO_COMPILEDIR
)/proxmox-tui-installer
41 $(MAKE
) -C banner
install
42 $(MAKE
) -C Proxmox
install
43 install -D
-m
644 interfaces
${DESTDIR}/etc
/network
/interfaces
44 install -D
-m
755 fake-start-stop-daemon
${VARLIBDIR}/fake-start-stop-daemon
45 install -D
-m
755 policy-disable-rc.d
$(VARLIBDIR
)/policy-disable-rc.d
46 install -D
-m
644 country.dat
$(VARLIBDIR
)/country.dat
47 install -D
-m
755 unconfigured.sh
${DESTDIR}/sbin
/unconfigured.sh
48 install -D
-m
755 proxinstall
${DESTDIR}/usr
/bin
/proxinstall
49 install -D
-m
755 proxmox-low-level-installer
$(DESTDIR
)/$(BINDIR
)/proxmox-low-level-installer
50 $(foreach i
,$(USR_BIN
), install -m755
$(CARGO_COMPILEDIR
)/$(i
) $(DESTDIR
)$(BINDIR
)/)
51 install -D
-m
755 checktime
${DESTDIR}/usr
/bin
/checktime
52 install -D
-m
644 xinitrc
${DESTDIR}/.xinitrc
53 install -D
-m
755 spice-vdagent.sh
${DESTDIR}/.spice-vdagent.sh
54 install -D
-m
644 Xdefaults
${DESTDIR}/.Xdefaults
57 $(CARGO
) build
--package proxmox-tui-installer
--bin proxmox-tui-installer
$(CARGO_BUILD_ARGS
)
59 %-banner.png
: %-banner.svg
63 upload
: UPLOAD_DIST ?
= $(DEB_DISTRIBUTION
)
65 tar cf
- ${DEB} | ssh
-X repoman@repo.proxmox.com
-- upload
--product pve
,pmg
,pbs
--dist $(UPLOAD_DIST
)
73 .PHONY
: prepare-check-env
74 prepare-check-env
: $(DEB
)
75 umount
-Rd testdir || true
77 dpkg
-X
$(DEB
) testdir
79 cd-info.
test: PRODUCT ?
= pve
81 printf
'%s\n' "PRODUCT='$(or $(PRODUCT), pve)'" >$@.tmp
82 printf
'%s\n' "PRODUCTLONG='$(or $(PRODUCTLONG), Proxmox VE)'" >>$@.tmp
83 printf
'%s\n' "RELEASE='$(or $(RELEASE), 42.1)'" >>$@.tmp
84 printf
'%s\n' "ISORELEASE='$(or $(ISORELEASE), 1)'" >>$@.tmp
85 printf
'%s\n' "ISONAME='$(or $(ISONAME), proxmox-ve)'" >>$@.tmp
88 check-pve
: prepare-check-env
test.img
89 rm -f cd-info.
test; $(MAKE
) cd-info.
test
90 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
92 check-pve-multidisks
: prepare-check-env
test.img test2.img test3.img test4.img test5.big.img
93 rm -f cd-info.
test; $(MAKE
) cd-info.
test
94 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
96 check-pmg
: prepare-check-env
test.img
97 rm -f cd-info.
test; $(MAKE
) \
99 PRODUCTLONG
="Proxmox Mail Gateway" \
100 ISONAME
='proxmox-mail-gateway' \
102 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
104 check-pbs
: prepare-check-env
test.img
105 rm -f cd-info.
test; $(MAKE
) \
107 PRODUCTLONG
='Proxmox Backup Server' \
108 ISONAME
='proxmox-backup-server' \
110 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
115 umount
-Rd testdir || true
116 rm -rf
*~
*.deb target build packages packages.tmp testdir
test*.img pve-final.pkglist \
117 *.buildinfo
*.changes country.dat final.pkglist cd-info.
test
118 find .
-name
'*~' -exec
rm {} ';'