Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
HOMEBREW
Awesome Package Management for OS X




ATLRUG                                 RailsMachine
June 2010            ...
HOMEBREW

1. Introduction

2. Getting Started

3. Creating Your Own Packages

4. Wrapping Things Up
HOMEBREW

1. Introduction

2. Getting Started

3. Creating Your Own Packages

4. Wrapping Things Up
INTRODUCTION
INTRODUCTION
• Packagemanagement for OS
 X that doesn’t suck
INTRODUCTION
• Packagemanagement for OS
 X that doesn’t suck

• Powered   by Ruby and Git
INTRODUCTION
• Packagemanagement for OS
 X that doesn’t suck

• Powered    by Ruby and Git

• Pretty   popular
INTRODUCTION
• Packagemanagement for OS
 X that doesn’t suck

• Powered    by Ruby and Git

• Pretty   popular

• Easy   t...
INTRODUCTION
• Packagemanagement for OS
 X that doesn’t suck

• Powered    by Ruby and Git

• Pretty   popular

• Easy   t...
HOW POPULAR IS PRETTY POPULAR?
HOW POPULAR IS PRETTY POPULAR?
HOW POPULAR IS PRETTY POPULAR?
WHY USE HOMEBREW?
WHY USE HOMEBREW?
• Fink   and MacPorts have the wrong philosophy
WHY USE HOMEBREW?
• Fink   and MacPorts have the wrong philosophy

• Sticks   to one standard prefix — /usr/local
WHY USE HOMEBREW?
• Fink   and MacPorts have the wrong philosophy

• Sticks   to one standard prefix — /usr/local

• Doesn’...
WHY USE HOMEBREW?
• Fink   and MacPorts have the wrong philosophy

• Sticks   to one standard prefix — /usr/local

• Doesn’...
WHY USE HOMEBREW?
• Fink   and MacPorts have the wrong philosophy

• Sticks   to one standard prefix — /usr/local

• Doesn’...
WHY NOT?
WHY NOT?
• Support for multiple versions of the same package is
 “okay”, but not great
WHY NOT?
• Support for multiple versions of the same package is
 “okay”, but not great

• Fink   and Macports “work” for n...
WHY NOT?
• Support for multiple versions of the same package is
 “okay”, but not great

• Fink   and Macports “work” for n...
HOMEBREW

1. Introduction

2. Getting Started

3. Creating Your Own Packages

4. Wrapping Things Up
GETTING STARTED
GETTING STARTED

# Install Homebrew

$ ruby -e "$(curl http://gist.github.com/raw/323731/install_homebrew.rb)"

# Update f...
USING HOMEBREW
$   brew install foo
$   brew uninstall foo
$   brew search [/regex/] [substring]
#   Update formulas from ...
SOME FORMULAS
ack             haproxy     nginx

bzr             hg          redis

git             hub         rlwrap

ca...
HOMEBREW

1. Introduction

2. Getting Started

3. Creating Your Own Packages

4. Wrapping Things Up
METAPHORS
             The package      /usr/local/Library/
 Formula
              description      Formula/foo.rb

      ...
CODE
require 'formula'
CODE
require 'formula'

class Sl < Formula
  url 'http://ftp.de.debian.org/debian/pool/main/s/sl/
sl_3.03.orig.tar.gz'
  v...
CODE
require 'formula'

class Sl < Formula
  url 'http://ftp.de.debian.org/debian/pool/main/s/sl/
sl_3.03.orig.tar.gz'
  v...
HOMEBREW

1. Introduction

2. Getting Started

3. Creating Your Own Packages

4. Wrapping Things Up
Any Questions?
HOMEBREW
twitter.com/machomebrew

github.com/mxcl/homebrew

irc.freenode.net/#machomebrew

homebrew@librelist.com
WILL FARRINGTON
Chief Intern of Entirely Superfluous Job Titles
will@railsmachine.com
willfarrington.com

MIKE SKALNIK
Head...
Upcoming SlideShare
Loading in …5
×

Homebrew atlrug

811 views

Published on

Homebrew slides, June 2010, atlrug

  • Be the first to comment

Homebrew atlrug

  1. 1. HOMEBREW Awesome Package Management for OS X ATLRUG RailsMachine June 2010 Will Farrington & Mike Skalnik
  2. 2. HOMEBREW 1. Introduction 2. Getting Started 3. Creating Your Own Packages 4. Wrapping Things Up
  3. 3. HOMEBREW 1. Introduction 2. Getting Started 3. Creating Your Own Packages 4. Wrapping Things Up
  4. 4. INTRODUCTION
  5. 5. INTRODUCTION • Packagemanagement for OS X that doesn’t suck
  6. 6. INTRODUCTION • Packagemanagement for OS X that doesn’t suck • Powered by Ruby and Git
  7. 7. INTRODUCTION • Packagemanagement for OS X that doesn’t suck • Powered by Ruby and Git • Pretty popular
  8. 8. INTRODUCTION • Packagemanagement for OS X that doesn’t suck • Powered by Ruby and Git • Pretty popular • Easy to contribute
  9. 9. INTRODUCTION • Packagemanagement for OS X that doesn’t suck • Powered by Ruby and Git • Pretty popular • Easy to contribute • Only requires XCode
  10. 10. HOW POPULAR IS PRETTY POPULAR?
  11. 11. HOW POPULAR IS PRETTY POPULAR?
  12. 12. HOW POPULAR IS PRETTY POPULAR?
  13. 13. WHY USE HOMEBREW?
  14. 14. WHY USE HOMEBREW? • Fink and MacPorts have the wrong philosophy
  15. 15. WHY USE HOMEBREW? • Fink and MacPorts have the wrong philosophy • Sticks to one standard prefix — /usr/local
  16. 16. WHY USE HOMEBREW? • Fink and MacPorts have the wrong philosophy • Sticks to one standard prefix — /usr/local • Doesn’t duplicate what Apple already provides
  17. 17. WHY USE HOMEBREW? • Fink and MacPorts have the wrong philosophy • Sticks to one standard prefix — /usr/local • Doesn’t duplicate what Apple already provides • Making new packages is dead simple
  18. 18. WHY USE HOMEBREW? • Fink and MacPorts have the wrong philosophy • Sticks to one standard prefix — /usr/local • Doesn’t duplicate what Apple already provides • Making new packages is dead simple • Very active user community
  19. 19. WHY NOT?
  20. 20. WHY NOT? • Support for multiple versions of the same package is “okay”, but not great
  21. 21. WHY NOT? • Support for multiple versions of the same package is “okay”, but not great • Fink and Macports “work” for now
  22. 22. WHY NOT? • Support for multiple versions of the same package is “okay”, but not great • Fink and Macports “work” for now • Doesn’t duplicate anything Apple already provides
  23. 23. HOMEBREW 1. Introduction 2. Getting Started 3. Creating Your Own Packages 4. Wrapping Things Up
  24. 24. GETTING STARTED
  25. 25. GETTING STARTED # Install Homebrew $ ruby -e "$(curl http://gist.github.com/raw/323731/install_homebrew.rb)" # Update formulas $ brew update # List all available formulas $ brew search | less # ... PROFIT!
  26. 26. USING HOMEBREW $ brew install foo $ brew uninstall foo $ brew search [/regex/] [substring] # Update formulas from git $ brew update # Remove old versions of foo $ brew cleanup foo $ brew info foo # Show which installed formulas are outdated $ brew outdated # Remove all old versions of all formulas $ brew prune
  27. 27. SOME FORMULAS ack haproxy nginx bzr hg redis git hub rlwrap cassandra llvm rtorrent clojure memcached sphinx coffee-script mysql subversion ctags mongodb tex-live go monit tokyo-cabinet
  28. 28. HOMEBREW 1. Introduction 2. Getting Started 3. Creating Your Own Packages 4. Wrapping Things Up
  29. 29. METAPHORS The package /usr/local/Library/ Formula description Formula/foo.rb The installation /usr/local/Cellar/ Keg prefix of a foo/0.1 formula The location Cellar where all kegs are /usr/local/Cellar installed
  30. 30. CODE require 'formula'
  31. 31. CODE require 'formula' class Sl < Formula url 'http://ftp.de.debian.org/debian/pool/main/s/sl/ sl_3.03.orig.tar.gz' version '3.03' homepage 'http://packages.debian.org/source/oldstable/sl' md5 'd0d997b964bb3478f7f4968eee13c698' end
  32. 32. CODE require 'formula' class Sl < Formula url 'http://ftp.de.debian.org/debian/pool/main/s/sl/ sl_3.03.orig.tar.gz' version '3.03' homepage 'http://packages.debian.org/source/oldstable/sl' md5 'd0d997b964bb3478f7f4968eee13c698' def install system 'make' bin.install 'sl' man1.install 'sl.1' end end
  33. 33. HOMEBREW 1. Introduction 2. Getting Started 3. Creating Your Own Packages 4. Wrapping Things Up
  34. 34. Any Questions?
  35. 35. HOMEBREW twitter.com/machomebrew github.com/mxcl/homebrew irc.freenode.net/#machomebrew homebrew@librelist.com
  36. 36. WILL FARRINGTON Chief Intern of Entirely Superfluous Job Titles will@railsmachine.com willfarrington.com MIKE SKALNIK Head Intern — Crockpot-Related R&D, Gardening mike@railsmachine.com mikeskalnik.com

×