1 include /usr
/share
/dpkg
/pkg-info.mk
2 include /usr
/share
/dpkg
/architecture.mk
5 PACKAGE
=proxmox-offline-mirror
6 BUILDDIR ?
= $(PACKAGE
)-$(DEB_VERSION_UPSTREAM
)
7 BUILDDIR_TMP ?
= $(BUILDDIR
).tmp
11 DEB
=$(PACKAGE
)_
$(DEB_VERSION_UPSTREAM_REVISION
)_
$(DEB_BUILD_ARCH
).deb
12 LIB_DEB
=librust-
$(PACKAGE
)-dev_
$(DEB_VERSION_UPSTREAM_REVISION
)_
$(DEB_BUILD_ARCH
).deb
13 DBG_DEB
=$(PACKAGE
)-dbgsym_
$(DEB_VERSION_UPSTREAM_REVISION
)_
$(DEB_BUILD_ARCH
).deb
14 DOC_DEB
=$(PACKAGE
)-docs_
$(DEB_VERSION_UPSTREAM_REVISION
)_all.deb
15 DSC
=rust-
$(PACKAGE
)_
$(DEB_VERSION_UPSTREAM_REVISION
).dsc
17 ifeq ($(BUILD_MODE
), release
)
18 CARGO_BUILD_ARGS
+= --release
19 COMPILEDIR
:= target
/release
21 COMPILEDIR
:= target
/debug
24 all: cargo-build
$(SUBDIRS
)
28 cargo build
$(CARGO_BUILD_ARGS
)
36 rm -rf
$(BUILDDIR
) $(BUILDDIR_TMP
); mkdir
$(BUILDDIR_TMP
)
39 --config debian
/debcargo.toml \
41 --no-overlay-write-back \
42 --directory
$(BUILDDIR_TMP
) \
44 $(shell dpkg-parsechangelog
-l debian
/changelog
-SVersion | sed
-e
's/-.*//')
45 cat
$(BUILDDIR_TMP
)/debian
/control debian
/control.docs
> debian
/control
46 cp
-a debian
/control
$(BUILDDIR_TMP
)/debian
/control
47 rm -f
$(BUILDDIR_TMP
)/Cargo.lock
48 find
$(BUILDDIR_TMP
)/debian
-name
"*.hint" -delete
49 mv
$(BUILDDIR_TMP
) $(BUILDDIR
)
54 cd
$(BUILDDIR
); dpkg-buildpackage
-b
-us
-uc
--no-pre-clean
60 cd
$(BUILDDIR
); dpkg-buildpackage
-S
-us
-uc
-d
-nc
65 dpkg
-i
$(DEB
) $(DBG_DEB
) $(DOC_DEB
)
69 tar cf
- $(DEB
) $(DBG_DEB
) $(DOC_DEB
) | ssh
-X repoman@repo.proxmox.com
-- upload
--product pve
,pmg
,pbs
,pbs-client
--dist bullseye
--arch
$(DEB_BUILD_ARCH
)
77 rm -rf
*.deb
*.buildinfo
*.changes
*.dsc rust-
$(PACKAGE
)_
*.
tar.?z
$(BUILDDIR
) $(BUILDDIR_TMP
)
78 find .
-name
'*~' -exec
rm {} ';'