2024-06-20 14:33:21 +03:00
i n c l u d e / u s r / s h a r e / d p k g / a r c h i t e c t u r e . m k
i n c l u d e / u s r / s h a r e / d p k g / p k g - i n f o . m k
SRCPACKAGE = rust-pxar
PACKAGE = lib$( SRCPACKAGE) -dev
ARCH := $( DEB_BUILD_ARCH)
DEB = $( PACKAGE) _$( DEB_VERSION) _$( ARCH) .deb
DSC = $( SRCPACKAGE) _$( DEB_VERSION) _$( ARCH) .deb
2020-06-03 13:40:45 +03:00
.PHONY : all
all : check
.PHONY : check
check :
2020-06-26 13:27:42 +03:00
cargo test --all-features
2020-06-03 13:40:45 +03:00
.PHONY : dinstall
dinstall : deb
2020-07-29 09:10:21 +03:00
sudo -k dpkg -i build/librust-*.deb
2020-06-03 13:40:45 +03:00
2020-08-25 10:30:55 +03:00
build :
2020-06-03 13:40:45 +03:00
rm -rf build
2020-12-15 15:10:50 +03:00
rm -f debian/control
2020-07-29 09:07:47 +03:00
mkdir build
2020-06-03 13:40:45 +03:00
debcargo package \
--config " $( PWD) /debian/debcargo.toml " \
--changelog-ready \
--no-overlay-write-back \
2020-07-29 09:07:47 +03:00
--directory " $( PWD) /build/pxar " \
2020-06-03 13:40:45 +03:00
"pxar" \
" $$ (dpkg-parsechangelog -l " debian/changelog" -SVersion | sed -e 's/-.*//')"
echo system >build/rust-toolchain
2020-08-25 10:30:55 +03:00
rm -f build/pxar/Cargo.lock
find build/pxar/debian -name '*.hint' -delete
cp build/pxar/debian/control debian/control
.PHONY : deb
2024-06-20 14:33:21 +03:00
deb :
rm -rf build
$( MAKE) build/$( DEB)
build/$(DEB) : build
2020-07-29 09:07:47 +03:00
( cd build/pxar && CARGO = /usr/bin/cargo RUSTC = /usr/bin/rustc dpkg-buildpackage -b -uc -us)
lintian build/*.deb
2020-06-03 13:40:45 +03:00
.PHONY : clean
clean :
2020-06-04 12:29:58 +03:00
rm -rf build *.deb *.buildinfo *.changes *.orig.tar.gz
2020-06-03 13:40:45 +03:00
cargo clean
2020-07-29 08:49:45 +03:00
2024-06-20 14:33:21 +03:00
.PHONY : upload
upload : UPLOAD_DIST ?= $( DEB_DISTRIBUTION )
upload : build /$( DEB )
2020-07-29 08:49:45 +03:00
cd build; \
dcmd --deb rust-pxar_*.changes \
| grep -v '.changes$$' \
| tar -cf- -T- \
2024-06-20 14:35:49 +03:00
| ssh -X repoman@repo.proxmox.com upload --product devel --dist $( UPLOAD_DIST)