From 92f5db08c399b2caa330d3b8e6c4535c803b9cb9 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 24 Jun 2013 19:04:33 +0200 Subject: [PATCH] osx: simpler instructions in README.md --- README.md | 54 ++++++++++++++---------------------------------------- 1 file changed, 14 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index eec6003b..c8fe955c 100644 --- a/README.md +++ b/README.md @@ -71,50 +71,24 @@ setgid `_lldpd`. Installation (Mac OS X) ----------------------- -The same procedure as above applies for Mac OS X. However, you may -want to install libevent from Homebrew, as well as Readline: - - brew install libevent - brew install readline - ./configure CPPFLAGS="-I$(brew --prefix readline)/include" \ - LDFLAGS="-L$(brew --prefix readline)/lib" \ - --with-privsep-chroot=/var/empty - make - sudo make install - -You need to create the `_lldpd` user and group: - - dscl . list /Users uid - dscl . list /Groups gid - # Find a free UID/GID, let's say 274 - dscl . -create /Groups/_lldpd - dscl . -create /Groups/_lldpd PrimaryGroupID 274 - dscl . -create /Groups/_lldpd Password "*" - dscl . -create /Groups/_lldpd RealName "lldpd privilege separation group" - dscl . -create /Users/_lldpd - dscl . -create /Users/_lldpd UserShell /usr/bin/false - dscl . -create /Users/_lldpd NFSHomeDirectory /var/empty - dscl . -create /Users/_lldpd PrimaryGroupID 274 - dscl . -create /Users/_lldpd UniqueID 274 - dscl . -create /Users/_lldpd Password "*" - dscl . -create /Users/_lldpd RealName "lldpd privilege separation user" - -Alternatively, you can use a convenient brew formula: - - brew install https://raw.github.com/vincentbernat/lldpd/master/osx/lldpd.rb +The same procedure as above applies for Mac OS X. However, there are +simpler alternatives: -This formula includes the ability to interface properly with launchd -to start `lldpd` at boot. + 1. Use [Homebrew](http://mxcl.github.io/homebrew/): -You can also build a package with: + brew install lldpd + # Or, for the latest version: + brew install https://raw.github.com/vincentbernat/lldpd/master/osx/lldpd.rb - make -C osx pkg - -To avoid the package being dependent of the system you built it on, -you are advised to use the following `./configure` invocation: + 2. Build an OSX installer package: + + ./configure CC="gcc -arch i386 -arch x86_64" CPP="gcc -E" \ + --prefix=/usr --sysconfdir=/etc --with-embedded-libevent + make -C osx pkg - ./configure CC="gcc -arch i386 -arch x86_64" CPP="gcc -E" \ - --prefix=/usr --sysconfdir=/etc --with-embedded-libevent +If you don't follow the above procedures, you will have to create the +user/group `_lldpd`. Have a look at how this is done in +`osx/scripts/postinstall`. Usage ----- -- 2.39.5