Alpine: use qrencode from libqrencode-tools package instead of building from source (#551)

This commit is contained in:
Local Dev 2025-05-29 04:44:47 +07:00 committed by GitHub
parent cae93aa02c
commit 95f0d4fb5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -225,10 +225,7 @@ function installWireGuard() {
pacman -S --needed --noconfirm wireguard-tools qrencode
elif [[ ${OS} == 'alpine' ]]; then
apk update
apk add wireguard-tools iptables build-base libpng-dev
curl -O https://fukuchi.org/works/qrencode/qrencode-4.1.1.tar.gz
tar xf qrencode-4.1.1.tar.gz
(cd qrencode-4.1.1 || exit && ./configure && make && make install && ldconfig)
apk add wireguard-tools iptables libqrencode-tools
fi
# Make sure the directory exists (this does not seem the be the case on fedora)
@ -513,7 +510,7 @@ function uninstallWg() {
elif [[ ${OS} == 'alpine' ]]; then
(cd qrencode-4.1.1 || exit && make uninstall)
rm -rf qrencode-* || exit
apk del wireguard-tools build-base libpng-dev
apk del wireguard-tools libqrencode libqrencode-tools
fi
rm -rf /etc/wireguard