1 include /usr
/share
/dpkg
/default.mk
3 PACKAGE
= proxmox-installer
4 BUILDDIR ?
= $(PACKAGE
)-$(DEB_VERSION_UPSTREAM
)
6 DEB
=$(PACKAGE
)_
$(DEB_VERSION
)_
$(DEB_HOST_ARCH
).deb
9 ifeq ($(BUILD_MODE
), release
)
10 CARGO_BUILD_ARGS
+= --release
11 CARGO_COMPILEDIR
:= target
/release
13 CARGO_COMPILEDIR
:= target
/debug
16 INSTALLER_SOURCES
=$(shell git ls-files
) country.dat
19 BINDIR
= $(PREFIX
)/bin
20 USR_BIN
:= proxmox-tui-installer
23 $(addprefix $(CARGO_COMPILEDIR
)/,$(USR_BIN
))
28 rm -rf
$@
$@.tmp
; mkdir
$@.tmp
37 fake-start-stop-daemon \
42 proxmox-low-level-installer \
43 proxmox-tui-installer
/ \
51 country.dat
: country.pl
52 .
/country.pl
> country.dat.tmp
53 mv country.dat.tmp country.dat
57 cd
$(BUILDDIR
); dpkg-buildpackage
-b
-us
-uc
60 test-
$(DEB
): $(INSTALLER_SOURCES
)
61 rsync
--exclude
='test*.img' -a
* build
62 cd build
; dpkg-buildpackage
-b
-us
-uc
-nc
66 VARLIBDIR
=$(DESTDIR
)/var
/lib
/proxmox-installer
67 HTMLDIR
=$(VARLIBDIR
)/html
/common
70 install: $(INSTALLER_SOURCES
) $(CARGO_COMPILEDIR
)/proxmox-tui-installer
71 $(MAKE
) -C banner
install
72 $(MAKE
) -C Proxmox
install
73 install -D
-m
644 interfaces
$(DESTDIR
)/etc
/network
/interfaces
74 install -D
-m
755 fake-start-stop-daemon
$(VARLIBDIR
)/fake-start-stop-daemon
75 install -D
-m
755 policy-disable-rc.d
$(VARLIBDIR
)/policy-disable-rc.d
76 install -D
-m
644 country.dat
$(VARLIBDIR
)/country.dat
77 install -D
-m
755 unconfigured.sh
$(DESTDIR
)/sbin
/unconfigured.sh
78 install -D
-m
755 proxinstall
$(DESTDIR
)/usr
/bin
/proxinstall
79 install -D
-m
755 proxmox-low-level-installer
$(DESTDIR
)/$(BINDIR
)/proxmox-low-level-installer
80 $(foreach i
,$(USR_BIN
), install -m755
$(CARGO_COMPILEDIR
)/$(i
) $(DESTDIR
)$(BINDIR
)/)
81 install -D
-m
755 checktime
$(DESTDIR
)/usr
/bin
/checktime
82 install -D
-m
644 xinitrc
$(DESTDIR
)/.xinitrc
83 install -D
-m
755 spice-vdagent.sh
$(DESTDIR
)/.spice-vdagent.sh
84 install -D
-m
644 Xdefaults
$(DESTDIR
)/.Xdefaults
87 $(CARGO
) build
--package proxmox-tui-installer
--bin proxmox-tui-installer
$(CARGO_BUILD_ARGS
)
89 %-banner.png
: %-banner.svg
93 upload
: UPLOAD_DIST ?
= $(DEB_DISTRIBUTION
)
95 tar cf
- $(DEB
) | ssh
-X repoman@repo.proxmox.com
-- upload
--product pve
,pmg
,pbs
--dist $(UPLOAD_DIST
)
103 .PHONY
: prepare-check-env
104 prepare-check-env
: test-
$(DEB
)
106 dpkg
-X test-
$(DEB
) testdir
108 cd-info.
test: PRODUCT ?
= pve
110 printf
'%s\n' "PRODUCT='$(or $(PRODUCT), pve)'" >$@.tmp
111 printf
'%s\n' "PRODUCTLONG='$(or $(PRODUCTLONG), Proxmox VE)'" >>$@.tmp
112 printf
'%s\n' "RELEASE='$(or $(RELEASE), 42.1)'" >>$@.tmp
113 printf
'%s\n' "ISORELEASE='$(or $(ISORELEASE), 1)'" >>$@.tmp
114 printf
'%s\n' "ISONAME='$(or $(ISONAME), proxmox-ve)'" >>$@.tmp
117 check-pve
: prepare-check-env
test.img
118 rm -f cd-info.
test; $(MAKE
) cd-info.
test
119 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
121 check-pve-multidisks
: prepare-check-env
test.img test2.img test3.img test4.img test5.big.img
122 rm -f cd-info.
test; $(MAKE
) cd-info.
test
123 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
125 check-pve-tui
: prepare-check-env
test.img
126 rm -f cd-info.
test; $(MAKE
) cd-info.
test
127 .
/proxmox-low-level-installer dump-env
-t
128 testdir
/usr
/bin
/proxmox-tui-installer
-t
test.img
130 check-pmg
: prepare-check-env
test.img
131 rm -f cd-info.
test; $(MAKE
) \
133 PRODUCTLONG
="Proxmox Mail Gateway" \
134 ISONAME
='proxmox-mail-gateway' \
136 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
138 check-pbs
: prepare-check-env
test.img
139 rm -f cd-info.
test; $(MAKE
) \
141 PRODUCTLONG
='Proxmox Backup Server' \
142 ISONAME
='proxmox-backup-server' \
144 G_SLICE
=always-malloc perl
-I testdir
/usr
/share
/perl5 testdir
/usr
/bin
/proxinstall
-t
test.img
149 rm -rf target build
$(PACKAGE
)-[0-9]*
150 rm -f
$(PACKAGE
)*.
tar* *.deb packages packages.tmp
*.build
*.dsc
*.buildinfo
*.changes
151 rm -f testdir
test*.img pve-final.pkglist country.dat final.pkglist cd-info.
test
152 find .
-name
'*~' -exec
rm {} ';'