I am fully aware that makepkg cannot get packages form AUR.
I onec tried yaourt but it was so full an onnoying blinking (!) warnings which I cannot figure out how to answer yes to that I cancelled it and immediately ran "pacman -Rns yaourt".
A few weeks ago I wrote a script called "aur-get" that basically goes through the steps you would manually take to install a package. It's really kludgy and for some reason fails to delete its temporary working directory, but it did the job of installing libpng12 and virtualbox_bin.
Code:
#!/bin/bash
# This script installs Arch Linux packages from the AUR.
tmpdir="aur-get.$$.$RANDOM"
intmpdir="0"
function quit {
if [ $intmpdir = "1" ]; then
cd ..
fi
rm -r "$tmpdir"
exit 0
}
# Check if root is executing this
if [ $(id --user) = "0" ]; then
echo "It is recommended you do not do this as root."
read -p "Do you want to continue [y/N]: " input
if [ input != "y" ]; then
quit
fi
fi
url='http://aur.archlinux.org/packages/'"$1"'/'"$1"'.tar.gz'
# Make temporary working directory ##########################################
mkdir "$tmpdir"
if [ $? != "0" ]; then
quit
fi
cd "$tmpdir"
intmpdir="1"
# Download and extract tarball ##############################################
echo ":: Downloading tarball..."
wget $url
if [ $? != "0" ]; then
quit
fi
echo ":: Extracting tarball..."
tar -vzxf *.tar.gz
if [ $? != "0" ]; then
quit
fi
rm *.tar.gz
# Ask user to review potentially dangerous files ############################
read -p "Do you want to review all PKGBUILD and .install files [Y/n]: " input
if [ input == "n" ]; then
true
else
(find . -name '*.install' -print; \
find . -name 'PKGBUILD' -print) | \
while read -r filename; do
less "$filename"
done
fi
cd *
if [ $? != "0" ]; then
quit
fi
read -p "Are you sure you want to make this package [y/N]: " input
if [ "$input" != "y" ]; then
quit
fi
# Install package ###########################################################
echo ":: Making package and installing dependencies..."
makepkg -s
if [ $? != "0" ]; then
quit
fi
echo ":: Installing package..."
sudo pacman -U *.pkg.tar.gz
if [ $? != "0" ]; then
quit
fi
# Remove temporary files ####################################################
cd ..
intmpdir="0"
rm -r $tmpdir
exit 0