Skip to content

Instantly share code, notes, and snippets.

@joewilliams
Created March 12, 2009 22:41
Show Gist options
  • Save joewilliams/78330 to your computer and use it in GitHub Desktop.
Save joewilliams/78330 to your computer and use it in GitHub Desktop.
#!/bin/bash
# 1st install Apple's XCode (dev tools, gcc, etc)
# Then... Setup
cat >$HOME/.bash_profile <<\THEEND
export PATH=$HOME/bin:/opt/local/bin:$PATH
export MANPATH=$HOME/man:/opt/local/man:$MANPATH
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
THEEND
source ~/.bash_profile
#
# MacPorts
#
cd /tmp
curl http://svn.macports.org/repository/macports/downloads\
/MacPorts-1.7.0/MacPorts-1.7.0.tar.bz2 | tar oxj
cd MacPorts-1.7.0
./configure
make && sudo make install
sudo /Developer/Tools/SetFile -a V /opt
sudo perl -p -i -e 's/^buildmakejobs.*$/buildmakejobs\t\t0/g' \
/opt/local/etc/macports/macports.conf
sudo port selfupdate
sudo port install git-core +svn +bash_completion
sudo port install mercurial +bash_completion
sudo port install bzr darcs tig tailor
# ruby/rails junk
sudo port install apache2 +workermpm
sudo port install mysql5 +server
sudo port install memcached
sudo port install ruby rb-rubygems rb-sqlite3 rb-mysql rb-cocoa
sudo port install imagemagick +gs +wmf
# rabbitmq needs python26 (w/ simplejson)
sudo port install python26 python_select ; # rabbitmq
sudo python_select python26
# couchdb needs these
sudo port install icu spidermonkey ; # couchdb
# nigxn needs these
sudo port install neon pcre ; # nignx
sudo port install ossp-uuid pwgen tidy cadaver stow wget ; # utils
#
# RubyGems
#
gem sources -a http://gems.github.com
gem sources -a http://gems.opscode.com
sudo gem install \
my \
list \
of \
gems
#
# Passenger & PassengerPane (rocks)
#
sudo su -
/opt/local/bin/gem install passenger
export PATH=/opt/local/apache2/bin:$PATH
passenger-install-apache2-module
cat >>/opt/local/apache2/conf/httpd.conf <<EOF
LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
PassengerRoot /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6
PassengerRuby /opt/local/bin/ruby
EOF
exit
cd ~/Projects
git clone git://github.com/alloy/passengerpane.git
cd passengerpane
rm passenger_pane_config.rb
ln -sf passenger_pane_config.rb.ports passenger_pane_config.rb
rake
#
# Hand-Compiled Erlang w/ awesome sauce
#
# 64 bit - comment this out if not on 64bit
export CC="gcc-4.2"
export CFLAGS="-march=nocona -O3 -pipe"
export LDFLAGS=$CFLAGS
# 64 bit - comment this out if not on 64bit
export PKG=$HOME/pkg
mkdir -p $PKG
ERLANG="erlang-r12b-5"
cd /tmp
curl http://erlang.org/download/otp_src_R12B-5.tar.gz | tar oxz
cd otp_src_R12B-5
curl http://erlang.org/download/otp_doc_man_R12B-5.tar.gz | tar oxz
# curl http://erlang.org/download/otp_doc_html_R12B-5.tar.gz | tar oxz
./configure --prefix=$PKG/$ERLANG --enable-hipe \
--enable-darwin-64bit ;# or not if you aren't on 64bit
make && make install
cp -r man $PKG/$ERLANG
stow -d $PKG $ERLANG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment