-
-
Save SoulInfernoDE/efcd8c75186346c92c872198b7b965ec to your computer and use it in GitHub Desktop.
fixed build error for gbinder-python on linux mint 21.1 (ubuntu 22.04)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: gbinder-python | |
Maintainer: Eugenio Paolantonio (g7) <[email protected]> | |
Section: python | |
Priority: optional | |
Build-Depends: debhelper (>= 9), | |
dh-python, | |
python3-all-dev (>= 3.2), | |
cython3, | |
libgbinder-dev (>= 1.1.20), | |
libglibutil-dev, | |
libglib2.0-dev, | |
pkgconf, | |
Standards-Version: 4.5.0.3 | |
Vcs-Browser: https://github.com/droidian/gbinder-python | |
Vcs-Git: https://github.com/droidian/gbinder-python.git | |
Package: python3-gbinder | |
Architecture: amd64 | |
Depends: python3, libgbinder | |
Description: Cython extension module for C++ gbinder functions | |
This package contains a cython extension module for gbinder, | |
allowing to call gbinder from Python scripts. | |
Version: 1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# script name: install_waydroid.sh | |
# description: Install Waydroid on unsupported Debian based distro caused by incompatible python3-gbinder package | |
# related to : https://github.com/waydroid/waydroid/issues/214#issuecomment-1120926304 | |
# author : Wachid Adi Nugroho <[email protected]> | |
# date : 2022-07-07 | |
# updated : 2023-07-17 for at least linux mint 21.1 | |
# updated by : https://github.com/SoulInfernoDE | |
# original | |
# credits : @author | |
export distro=$(grep -oP '(?<=^NAME=).*' /etc/os-release) | |
if [[ -f /usr/bin/dpkg ]]; | |
then | |
export arch=$(dpkg --print-architecture) | |
if ! ([[ $arch == "amd64" ]] || [[ $arch == "arm64" ]]); | |
then | |
echo "You're using $arch machine, currently waydroid repo only provides deb packages for amd64 and arm64 machine." | |
echo "If you're really want to install waydroid on this $arch machine you should build it with all the dependencies." | |
echo "Go check this link https://gist.github.com/cniw/98e204d7dbc73a3fa1bf61629b2a2fc1 or just run this command" | |
echo -e "\n \`curl -s https://gist.githubusercontent.com/cniw/98e204d7dbc73a3fa1bf61629b2a2fc1/raw | bash\`\n" | |
exit 0 | |
fi | |
[[ ${distro} =~ Debian ]] && \ | |
export codename=bullseye || \ | |
export codename=jammy | |
[[ ! -f /usr/bin/curl ]] && sudo apt install -y curl | |
sudo curl https://repo.waydro.id/waydroid.gpg -o /usr/share/keyrings/waydroid.gpg | |
echo "deb [signed-by=${_}] https://repo.waydro.id/ ${codename} main" | \ | |
sudo tee /etc/apt/sources.list.d/waydroid.list | |
sudo apt update | |
sudo apt install -y \ | |
build-essential cdbs devscripts equivs fakeroot \ | |
git git-buildpackage git-lfs \ | |
libgbinder-dev | |
mkdir ~/build-packages | |
cd ${_} | |
git clone https://github.com/waydroid/gbinder-python.git | |
cd gbinder-python | |
curl https://raw.githubusercontent.com/MrCyjaneK/waydroid-build/main/build_changelog -o build_changelog | |
bash ${_} $(git tag -l --sort=authordate | sed 's/[a-z/]//g' | uniq | tail -n1) | |
sudo mk-build-deps -ir -t "apt-get -o Debug::pkgProblemResolver=yes -y --no-install-recommends" | |
# using dpkg-deb instead of debuild | |
# sudo debuild -b -uc -us | |
# DEBIAN directory must be uppercase to work with dpkg-deb | |
mv ~/build-packages/gbinder-python/debian ~/build-packages/gbinder-python/DEBIAN | |
# The control file needs the spaced lines removes, depends corrected and a version number for the output .deb file | |
rm ~/build-packages/gbinder-python/DEBIAN/control | |
# removing the control file with wrong syntax and downloading the corrected file will help with this | |
wget https://gist.github.com/SoulInfernoDE/efcd8c75186346c92c872198b7b965ec/raw/fd3433ecced2cdb07689be883811339f801b4ce8/control ~/build-packages/gbinder-python/DEBIAN/ | |
dpkg-deb -b ~/build-packages/gbinder-python | |
sudo apt install -f -y ../*.deb | |
sudo apt remove -y gbinder-python-build-deps libgbinder-dev \ | |
git-buildpackage git-lfs fakeroot equivs devscripts cdbs | |
echo "You can remove git and build-essential packages too, by run:" | |
echo -e "\t\`sudo apt remove git build-essential\`" | |
sudo apt autoremove | |
sudo apt install -y waydroid | |
else | |
echo "Your distro ${distro} is not use dpkg as package manager" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment