Created
August 2, 2020 12:24
-
-
Save krmanik/95940f95c76ab7e912bd68ca652e9c9e to your computer and use it in GitHub Desktop.
Setup fakeroot inside termux arch linux
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 | |
set -ex | |
cd /tmp | |
#pacman -S --needed --noconfirm base-devel | |
#git clone https://aur.archlinux.org/nosudo | |
#cd nosudo | |
#makepkg -o | |
#cp nosudo /bin/sudo | |
#chmod +x /bin/sudo | |
#cd .. | |
if false; then | |
rm -rf fakeroot-tcp | |
git clone https://aur.archlinux.org/fakeroot-tcp /tmp/fakeroot-tcp | |
fi | |
cd fakeroot-tcp | |
sed -e 's:\(patch -p.*\):\1||true:' PKGBUILD > PKGBUILD.2 | |
sed -e 's:\(patch -p.*\):\1||true:' \ | |
-e 's:prefix=/usr:prefix=/tmp/fakeroot:' \ | |
-e 's:/usr/lib/libfakeroot:/tmp/fakeroot/libs:' \ | |
PKGBUILD > PKGBUILD.1 | |
cat >> PKGBUILD.1 <<END | |
set -ex | |
cd src | |
build | |
sudo make install | |
END | |
makepkg -Asop PKGBUILD.2 | |
bash PKGBUILD.1 | |
PATH=/tmp/fakeroot/bin:$PATH makepkg -Aip PKGBUILD.2 | |
ls -l *xz | |
echo Done | |
# vim:et sw=2 ts=2 ai nocp sta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment