Last active
August 29, 2015 14:16
-
-
Save liuyu121/5f9990851dd046be9840 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BUILDDIR=/tmp/phpimapmountainlion | |
# Original Script found at: | |
# http://blog.vucica.net/2012/10/installing-imap-extension-for-php-on-mountain-lion.html | |
mkdir "$BUILDDIR" | |
echo " " | |
echo "= FETCHING AND INSTALLING IMAP" | |
echo " " | |
cd "$BUILDDIR" | |
wget -c ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz | |
rm -rf imap-2007f | |
tar xvvfz imap-2007f.tar.gz | |
cd imap-2007f | |
make osx EXTRACFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" | |
sudo mkdir -p /usr/local/imap-2007f/include | |
sudo cp c-client/*.h /usr/local/imap-2007f/include | |
sudo mkdir -p /usr/local/imap-2007f/lib | |
sudo cp c-client/c-client.a /usr/local/imap-2007f/lib/libc-client.a | |
echo " " | |
echo "= FETCHING AND INSTALLING PCRE" | |
echo " " | |
cd "$BUILDDIR" | |
wget "http://sourceforge.net/projects/pcre/files/pcre/8.33/pcre-8.33.tar.gz" | |
rm -rf pcre-8.33 | |
tar xvvfz pcre-8.33.tar.gz | |
cd pcre-8.33 | |
./configure --prefix=/usr/local | |
make | |
sudo make install | |
echo " " | |
echo "= FETCHING AND INSTALLING PHP-IMAP" | |
echo " " | |
cd "$BUILDDIR" | |
PHPVERSION=`php --version|head -n1|cut -f 2 -d ' '` | |
##git clone -b "PHP-$PHPVERSION" https://github.com/php/php-src.git php-src | |
wget --no-check-certificate -c https://github.com/php/php-src/tarball/PHP-5.3.26 -O PHP-5.3.26.tar.gz | |
tar xvvfz PHP-5.3.26.tar.gz | |
cd `ls |grep php-php-src-|head -n1` | |
cd ext/imap | |
phpize | |
./configure --with-imap=/usr/local/imap-2007f --with-kerberos --with-imap-ssl | |
make | |
sudo cp modules/imap.so /usr/lib/php/extensions/no-debug-non-zts-20090626/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment