From: Hraban Luyat Date: Sun, 14 Aug 2016 14:05:38 +0000 (+0100) Subject: Update README to reflect pkg-config use. X-Git-Tag: v2.0.0~76^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5557f5713d200dd503d760227ff5f3988394008c;p=go-opus.git Update README to reflect pkg-config use. --- diff --git a/README.md b/README.md index ad85d47..6e87e74 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,33 @@ ## opus, by xiph.org This package provides Go bindings for the C library libopus, by xiph.org. The -library, that is, not the bindings. The bindings are by me, Hraban. +library, that is, not the bindings. The bindings are by me. Hraban. ### Build & installation -Installation is a bit of a mess right now but I'm working on simplifying it. -Here's the summary: +This package requires libopus and libopusfile development packages to be +installed on your system. These are available on Debian based systems from +aptitude as `libopus-dev` and `libopusfile-dev`, and on Mac OS X from homebrew. -Dependencies for debian based systems: +They are linked into the app using pkg-config. + +Debian, Ubuntu, ...: ```sh -sudo apt-get install autoconf libtool build-essential libssl-dev pkg-config libogg-dev libopus-dev libopusfile-dev +sudo apt-get install pkg-config libopus-dev libopusfile-dev ``` -Building this package itself: -``` -make -go build +Mac: +```sh +brew install pkg-config opus opusfile ``` -Now, here's the annoying part: the libopus.a and libopusfile.a files from the -current directory must always be present in every directory you use this this -package from. So if you create a new media player in Go and you include libopus, -you must put those .a files in your media player project directory. - -The advantage is that this puts the burden of managing libopus on the user of -this go opus package (i.e. you), but not on the user of *their* program. In the -media player example: you, the programmer, will have to manage the .a files, but -the users of your media player can use those bundled .a files without having to -apt-get or otherwise install anything related to opus. This is a worthwile -trade-off as long as opus is not widely available for all major platforms, yet. - -It can be changed -() but -that's on my TODO list for now, under "not worth the trouble until a lot of -people actually use this." +Note that this will link the opus libraries dynamically. This means everyone who +uses the resulting binary will need to have opus and opusfile installed (or +otherwise provided). ### License -The licensing terms for the Go bindings are found in the LICENSE file. The -licensing terms for libopus and libopusfile are probably found in their -respective source directories, which are checked out as git submodules as part -of the build process. - -However, because libopus and libopusfile are not (by source nor binaries) -included in this package, this package, in source code form, is (should be?) -unaffected by their licenses. That changes once you run make, which will -download the Opus source code, and go build, which will link it. +The licensing terms for the Go bindings are found in the LICENSE file. Hraban