Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
This script installs "shared-mime-info" on OS X Yosemite.
#!/bin/sh
# This script installs "shared-mime-info" to OS X Yosemite.
#
# Usage:
#
# $ sh this-script.sh [install-prefix]
#
# There is no need for you to modify the following.
PREFIX=${1-$HOME/MIME-INFO}
PATH=$PREFIX/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
export PATH
mkdir -p $PREFIX
mkdir -p $PREFIX/src
echo -------------------------
echo libxml2
echo http://xmlsoft.org
echo -------------------------
cd $PREFIX/src
curl -OL http://xmlsoft.org/sources/libxml2-2.9.2.tar.gz
tar xzf libxml2-2.9.2.tar.gz
cd libxml2-2.9.2
./configure --without-python --prefix=$PREFIX
make
make install
make clean
echo -------------------------
echo libiconv
echo https://www.gnu.org/software/libiconv/
echo -------------------------
cd $PREFIX/src
curl -OL http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar xzf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=$PREFIX
make
make install
make clean
echo -------------------------
echo gettext
echo https://www.gnu.org/software/gettext/
echo -------------------------
cd $PREFIX/src
curl -OL http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.3.tar.xz
tar xzf gettext-0.19.3.tar.xz
cd gettext-0.19.3
CFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib" ./configure --prefix=$PREFIX
make
make install
make clean
echo -------------------------
echo pkg-config
echo http://www.freedesktop.org/wiki/Software/pkg-config/
echo -------------------------
cd $PREFIX/src
curl -OL http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
tar xzf pkg-config-0.28.tar.gz
cd pkg-config-0.28
./configure --prefix=$PREFIX --with-internal-glib
make
make install
make clean
echo -------------------------
echo libffi
echo https://sourceware.org/libffi/
echo -------------------------
cd $PREFIX/src
curl -OL ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
tar xzf libffi-3.2.1.tar.gz
cd libffi-3.2.1
./configure --prefix=$PREFIX
make
make install
make clean
echo -------------------------
echo glib
echo http://www.gtk.org
echo -------------------------
cd $PREFIX/src
curl -OL http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz
tar xzf glib-2.42.1.tar.xz
cd glib-2.42.1
LIBS="-L$PREFIX/lib" CFLAGS="-I$PREFIX/include" ./configure --prefix=$PREFIX
make
make install
make clean
echo -------------------------
echo intltool
echo http://freedesktop.org/wiki/Software/intltool/
echo -------------------------
cd $PREFIX/src
curl -OL https://launchpad.net/intltool/trunk/0.50.2/+download/intltool-0.50.2.tar.gz
tar xzf intltool-0.50.2.tar.gz
cd intltool-0.50.2
./configure --prefix=$PREFIX
make
make install
make clean
echo -------------------------
echo shared-mime-info
echo http://freedesktop.org/wiki/Software/shared-mime-info/
echo -------------------------
cd $PREFIX/src
curl -OL http://freedesktop.org/~hadess/shared-mime-info-1.3.tar.xz
tar xzf shared-mime-info-1.3.tar.xz
cd shared-mime-info-1.3
PKG_CONFIG=$PREFIX/bin/pkg-config PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./configure --prefix=$PREFIX
make
cd po
INTLTOOL_EXTRACT="$PREFIX/bin/intltool-extract" srcdir=. $PREFIX/bin/intltool-update --gettext-package shared-mime-info --pot
make
cd ..
make
make install
make clean
echo -------------------------
echo Done.
echo All packages are installed in $PREFIX
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment