Skip to content

Commit

Permalink
Merge commit 'acbdb17fe73dd9'
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Apr 16, 2011
2 parents 8ae1246 + acbdb17 commit 825f481
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
50 changes: 36 additions & 14 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,64 @@ Type `make` to build the packet decoder, `hairtunes`.
You need the following installed:

* openssl
* libao (if you use homebrew, use brew install libao)
* avahi (avahi-daemon running and avahi-publish-service on path, no need on Mac OSX)
* libao
* Perl

Debian/Ubuntu users need:

libssl-dev libcrypt-openssl-rsa-perl libao2 libao-dev libio-socket-inet6-perl libwww-perl avahi-utils
* Linux: avahi
* Windows/Mac OS X: Bonjour

Perl modules (install from CPAN if needed e.g. `perl -MCPAN -e 'install X'`):

* HTTP::Message
* Crypt::OpenSSL::RSA
* IO::Socket::INET6

MacOSX:
## Debian/Ubuntu:

apt-get install libssl-dev libcrypt-openssl-rsa-perl libao2 libao-dev libio-socket-inet6-perl libwww-perl avahi-utils
make
perl shairport.pl

## Mac OS X:

* install XCode
* install [Homebrew](https://github.com/mxcl/homebrew)
* install [Homebrew](https://github.com/mxcl/homebrew) or [Macports](http:https://www.macports.org/)
* type:

$ export ARCHFLAGS="-arch x86_64"
$ brew install pkg-config libao
$ export ARCHFLAGS="-arch $HOSTTYPE"
$ brew/port install pkg-config libao
$ make
$ perl -MCPAN -e 'install Crypt::OpenSSL::RSA'
$ perl -MCPAN -e 'install IO::Socket::INET6'
$ perl shairport.pl

OSX 10.5 only bundles Perl 5.8, which won't work with shairport.
After getting a update [here](http:https://www.perl.org/get.html), it worked.
Users of OS X 10.5 and below will need to install a newer perl by running `port/brew install perl`

How to run as a daemon on Mac 10.6
------
### How to run as a daemon on Mac 10.6

$ cp hairtunes shairport.pl /usr/local/bin
$ vi /usr/local/bin/shairport.pl, change the path of hairtunes from ./hairtunes to /usr/local/bin/hairtunes
$ mkdir -p ~/Library/LaunchAgents
$ cp org.mafipulation.shairport.plist ~/Library/LaunchAgents/
$ launchctl load org.mafipulation.shairport.plist
$ launchctl unload org.mafipulation.shairport.plist (to remove)

## Windows

* Download and install Cygwin.
* During setup, select
* openssl-devel
* openssl
* libao
* libao-devel
* gcc4
* make
* pkg-config
* perl
* Install [Bonjour for Windows](http:https://support.apple.com/kb/DL999)
* Launch the Cygwin Bash shell
* type:

$ make
$ perl -MCPAN -e 'install Crypt::OpenSSL::RSA'
$ perl -MCPAN -e 'install IO::Socket::INET6'
$ perl shairport.pl
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PAUFLAGS:=-lportaudio
all: hairtunes

hairtunes: hairtunes.c alac.c
$(CC) $(CFLAGS) $(PKGFLAGS) $(LDFLAGS) hairtunes.c alac.c -o $@
$(CC) $(CFLAGS) hairtunes.c alac.c -o $@ $(PKGFLAGS) $(LDFLAGS)

clean:
-@rm -rf hairtunes
Expand Down

0 comments on commit 825f481

Please sign in to comment.