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
)
81 dpkg
-X test-
$(DEB
) testdir
83 cd-info.
test: PRODUCT ?
= pve
85 printf
'%s\n' "PRODUCT='$(or $(PRODUCT), pve)'" >$@.tmp
86 printf
'%s\n' "PRODUCTLONG='$(or $(PRODUCTLONG), Proxmox VE)'" >>$@.tmp
87 printf
'%s\n' "RELEASE='$(or $(RELEASE), 42.1)'" >>$@.tmp
88 printf
'%s\n' "ISORELEASE='$(or $(ISORELEASE), 1)'" >>$@.tmp
89 printf
'%s\n' "ISONAME='$(or $(ISONAME), proxmox-ve)'" >>$@.tmp
92 check-pve
: prepare-check-env
test.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
96 check-pve-multidisks
: prepare-check-env
test.img test2.img test3.img test4.img test5.big.img
97 rm -f cd-info.
test; $(MAKE
) cd-info.
test
98 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
100 check-pve-tui
: prepare-check-env
test.img
101 rm -f cd-info.
test; $(MAKE
) cd-info.
test
102 .
/proxmox-low-level-installer dump-env
-t
103 testdir
/usr
/bin
/proxmox-tui-installer
-t
test.img
105 check-pmg
: prepare-check-env
test.img
106 rm -f cd-info.
test; $(MAKE
) \
108 PRODUCTLONG
="Proxmox Mail Gateway" \
109 ISONAME
='proxmox-mail-gateway' \
111 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
113 check-pbs
: prepare-check-env
test.img
114 rm -f cd-info.
test; $(MAKE
) \
116 PRODUCTLONG
='Proxmox Backup Server' \
117 ISONAME
='proxmox-backup-server' \
119 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
124 rm -rf target build
$(PACKAGE
)-[0-9]*
125 rm -f
$(PACKAGE
)*.
tar* *.deb packages packages.tmp
*.build
*.dsc
*.buildinfo
*.changes
126 rm -f testdir
test*.img pve-final.pkglist country.dat final.pkglist cd-info.
test
127 find .
-name
'*~' -exec
rm {} ';'