No description
Find a file
2024-11-17 14:17:13 +02:00
README.md . 2024-11-17 14:17:13 +02:00
UNLICENSE . 2024-07-22 20:32:34 +03:00
zstd.md . 2024-07-22 20:32:34 +03:00

# Alpine Linux 3.19

cd /var/lib/libvirt/images/
qemu-img create -f qcow2 alpinecross.qcow2 64G
virt-install --osinfo detect=on,require=off --cdrom /root/alpine-standard-3.19.1-x86_64.iso \
	--vcpus 20 --ram 8192 --disk /var/lib/libvirt/images/alpinecross.qcow2 \
	--virt-type kvm --network network=default --graphics none --boot cdrom,hd \
	--name alpinecross

# install os
vi /etc/apk/repositories

# let it be
apk add alpine-sdk llvm llvm-dev gcc shadow bash openssl-dev libsodium-dev perl
apk add curl openssl-libs-static libsodium-static zstd-static

chsh root <- /bin/bash

# install rustup, enable it
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
edit .profile, enable env

# only and only if you want pijul-static
cargo install pijul --version "~1.0.0-beta"
pijul clone https://nest.pijul.com/pijul/pijul

# always
rustup target add x86_64-pc-windows-gnu
apk add mingw-w64-gcc

# always, STATIC!
wget https://openssl.org/source/openssl-3.3.0.tar.gz
gunzip openssl-3.3.0.tar.gz
tar xvf openssl-3.3.0.tar
cd openssl-3.3.0/
./Configure --openssldir=/usr/x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32 --libdir=lib --cross-compile-prefix=x86_64-w64-mingw32- no-shared no-pinshared no-docs no-tests mingw64
make -j20
make DESTDIR=/ install

# always, STATIC!
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.20.tar.gz
gunzip libsodium-1.0.20.tar.gz
tar xvf libsodium-1.0.20.tar
cd libsodium-1.0.20/
./configure --prefix=/usr/x86_64-w64-mingw32 --disable-shared --host x86_64-w64-mingw32 --target x86_64-w64-mingw32
make -j20
make install

# zstd
wget https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz
gunzip zstd-1.5.6.tar.gz
tar xvf zstd-1.5.6.tar.gz
cd zstd-1.5.6
make TARGET_SYSTEM=Windows CC=x86_64-w64-mingw32-gcc -j20
cp lib/libzstd.a /usr/x86_64-w64-mingw32/lib

# only for pijul-static upstream
cd ~/pijul
cargo update
SODIUM_USE_PKG_CONFIG=1 PKG_CONFIG_SYSROOT_DIR=/usr/x86_64-w64-mingw32 cargo build --release --all-features --target x86_64-pc-windows-gnu

# only for pijul.exe
SODIUM_USE_PKG_CONFIG=1 PKG_CONFIG_SYSROOT_DIR=/usr/x86_64-w64-mingw32 cargo install pijul --force --version "~1.0.0-beta" --all-features --target x86_64-pc-windows-gnu