cd
test -f installed/gpac-0.4.4.tar.gz && mv installed/gpac-0.4.4.tar.gz .
test ! -f gpac-0.4.4.tar.gz &&
wget http://downloads.sourceforge.net/gpac/gpac-0.4.4.tar.gz
mkdir -p -m 0700 src
cd src
test -L ./gpac && rm ./gpac
test -d ./gpac && rm -r ./gpac
find -maxdepth 1 -type d -name "gpac-*" -exec rm -r {} \;
tar xzvf ~/gpac-0.4.4.tar.gz
mv -f gpac gpac-0.4.4
cd gpac-0.4.4
test $UID = 0 && chown -R root:root .
chmod 700 ./configure
# FYI, the configured used here is not an autoconf one
# If you do use IPv6, obviously leave off --disable-ipv6
# If you have OpenSSL installed under /usr/local/ssl, you might
# as well just pass --disable-ssl because getting configure to
# see it will not be easy...
./configure --disable-ipv6
make
# Become root to install it
su
# Install it
make install
ldconfig
# Install the includes (used by x264)
cp -a include/gpac /usr/local/include/
# Make sure the source directory and files are read/write by
# your non-root user
chown -R $USER .
chmod -R u+w .