1 include /usr
/share
/dpkg
/pkg-info.mk
2 include /usr
/share
/dpkg
/architecture.mk
5 BUILDDIR ?
= $(PACKAGE
)-$(DEB_VERSION_UPSTREAM
)
6 BUILDDIR_TMP ?
= $(BUILDDIR
).tmp
8 DEB
=librust-
$(PACKAGE
)-dev_
$(DEB_VERSION_UPSTREAM_REVISION
)_
$(DEB_BUILD_ARCH
).deb
9 DSC
=rust-
$(PACKAGE
)_
$(DEB_VERSION_UPSTREAM_REVISION
).dsc
11 ifeq ($(BUILD_MODE
), release
)
12 CARGO_BUILD_ARGS
+= --release
13 COMPILEDIR
:= target
/release
15 COMPILEDIR
:= target
/debug
18 all: cargo-build
$(SUBDIRS
)
22 cargo build
$(CARGO_BUILD_ARGS
)
26 rm -rf
$(BUILDDIR
) $(BUILDDIR_TMP
); mkdir
$(BUILDDIR_TMP
)
29 --config debian
/debcargo.toml \
31 --no-overlay-write-back \
32 --directory
$(BUILDDIR_TMP
) \
34 $(shell dpkg-parsechangelog
-l debian
/changelog
-SVersion | sed
-e
's/-.*//')
35 cp
$(BUILDDIR_TMP
)/debian
/control debian
/control
36 rm -f
$(BUILDDIR_TMP
)/Cargo.lock
37 find
$(BUILDDIR_TMP
)/debian
-name
"*.hint" -delete
38 mv
$(BUILDDIR_TMP
) $(BUILDDIR
)
43 cd
$(BUILDDIR
); dpkg-buildpackage
-b
-us
-uc
--no-pre-clean
49 cd
$(BUILDDIR
); dpkg-buildpackage
-S
-us
-uc
-d
-nc
58 tar cf
- $(DEB
) | ssh
-X repoman@repo.proxmox.com
-- upload
--product devel
--dist bullseye
--arch
$(DEB_BUILD_ARCH
)
66 rm -rf
*.deb
*.buildinfo
*.changes
*.dsc rust-
$(PACKAGE
)_
*.
tar.?z
$(BUILDDIR
) $(BUILDDIR_TMP
)
67 find .
-name
'*~' -exec
rm {} ';'