pxvirt/packages/common.sh
2024-12-24 18:06:42 +08:00

35 lines
1.0 KiB
Bash

#!/bin/bash
copy_dir(){
rsync -ra $SH_DIR/$PKGNAME /build
cd /build/$PKGNAME
}
exec_build_make(){
version=`dpkg-parsechangelog -Sversion`
debchange -v $version'+pxcloud' -D bookworm --force-distribution -U -M "Update $PKGNAME to $version'+pxcloud' "
apt update
yes |mk-build-deps --install --remove
echo "clean "
make clean || echo ok
echo "build deb in `pwd` "
if [ $dscflag == "dsc" ];then
make dsc || "dsc build error but it is not fatal error"
fi
DEB_BUILD_OPTIONS=nocheck make deb || errlog "build deb error"
}
exec_build_dpkg(){
debchange -v "$version"+pxcloud"" -D bookworm --force-distribution -U -M "Update $PKGNAME to "$version"+pxcloud"" "
apt update
yes |mk-build-deps --install --remove
echo "clean "
make clean || echo ok
echo "build deb in `pwd` "
dpkg-buildpackage -b -us -uc || errlog "build deb error"
}
errlog(){
echo $1;
exit 1;
}