All credit goes to the Pacapt project. I just modified it to work with Termux https://github.com/icy/pacapt