Skip to content

Instantly share code, notes, and snippets.

@krmanik
Created August 2, 2020 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krmanik/95940f95c76ab7e912bd68ca652e9c9e to your computer and use it in GitHub Desktop.
Save krmanik/95940f95c76ab7e912bd68ca652e9c9e to your computer and use it in GitHub Desktop.
Setup fakeroot inside termux arch linux
#!/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