Fix architecture for znapzend rebuild
This commit is contained in:
parent
c19fd06281
commit
c2d9875782
@ -127,16 +127,18 @@ apt -qq update
|
|||||||
echo "Installing samba"
|
echo "Installing samba"
|
||||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install -t bullseye-backports acl samba-dsdb-modules samba-vfs-modules samba winbind wsdd zfs-dkms zfsutils-linux zfs-auto-snapshot
|
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install -t bullseye-backports acl samba-dsdb-modules samba-vfs-modules samba winbind wsdd zfs-dkms zfsutils-linux zfs-auto-snapshot
|
||||||
|
|
||||||
if [[ "$(arch)" == "aarch64" ]]; then
|
ARCH=$(arch)
|
||||||
|
|
||||||
|
if [[ "${ARCH}" == "aarch64" ]] || [[ "${ARCH}" == "riscv64" ]]; then
|
||||||
znapzend_version=$(apt search znapzend 2>/dev/null | grep znapzend | cut -d ' ' -f2)
|
znapzend_version=$(apt search znapzend 2>/dev/null | grep znapzend | cut -d ' ' -f2)
|
||||||
wget -O znapzend_${znapzend_version}_amd64.deb https://repo.45drives.com/debian/pool/main/z/znapzend/znapzend_${znapzend_version}_amd64.deb
|
wget -O znapzend_${znapzend_version}_amd64.deb https://repo.45drives.com/debian/pool/main/z/znapzend/znapzend_${znapzend_version}_amd64.deb
|
||||||
mkdir znapzend
|
mkdir znapzend
|
||||||
dpkg-deb -R znapzend_${znapzend_version}_amd64.deb ./znapzend
|
dpkg-deb -R znapzend_${znapzend_version}_amd64.deb ./znapzend
|
||||||
sed -i "s/amd64/arm64/g" ./znapzend/DEBIAN/control
|
sed -i "s/amd64/${ARCH}/g" ./znapzend/DEBIAN/control
|
||||||
sed -i "s/x86_64-linux-gnu/aarch64-linux-gnu/g" znapzend/usr/bin/*
|
sed -i "s/x86_64-linux-gnu/${ARCH}-linux-gnu/g" znapzend/usr/bin/*
|
||||||
mv znapzend/usr/lib/x86_64-linux-gnu znapzend/usr/lib/aarch64-linux-gnu
|
mv znapzend/usr/lib/x86_64-linux-gnu znapzend/usr/lib/${ARCH}-linux-gnu
|
||||||
dpkg-deb -b znapzend znapzend_${znapzend_version}_arm64.deb
|
dpkg-deb -b znapzend znapzend_${znapzend_version}_${ARCH}.deb
|
||||||
apt install ./znapzend_${znapzend_version}_arm64.deb
|
apt install ./znapzend_${znapzend_version}_${ARCH}.deb
|
||||||
systemctl disable znapzend.service
|
systemctl disable znapzend.service
|
||||||
rm -r znapzend*
|
rm -r znapzend*
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user