-
Notifications
You must be signed in to change notification settings - Fork 183
Build from source
We regularly develop and test with Ubuntu 14.04. Release binaries are built with Debian 7 and Raspbian 7.
Install Go. Don't use your distribution's package because it's either out of date, or will be soon. In particular, Go >= 1.4 is required to build. To check what version of Go you have:
$ go version
go version go1.5.1 linux/arm
Install a few dev packages. The connector uses:
- build tools to interface with C libraries via cgo
- CUPS to, you know, print
- Net-SNMP to collect extra status info directly from printers
- Avahi to announce it's presence via mDNS/DNS-SD
- git to clone the GitHub repository
If your distro is based on Debian (Ubuntu, Raspbian, Mint, others) then this one-liner will get all dependencies:
$ sudo apt-get install build-essential libcups2-dev libsnmp-dev libavahi-client-dev git
Fedora 22:
sudo dnf install gcc cups-devel avahi-devel net-snmp-develInstall XCode: https://itunes.apple.com/us/app/xcode/id497799835
Install the command line developer tools:
$ xcode-select --install
Accept the license agreement:
$ xcodebuild -license
It should work on any BSD, but no one has tried yet. If you try, let us know with GitHub issue.
The CUPS Connector is incompatible with Windows. Maybe some day.
$ go get github.com/google/cups-connector/...
You should now have two new binaries: gcp-cups-connector and gcp-cups-connector-util.
If you need to install Go from source (because there isn't a Go binary for your platform at https://golang.org/dl) then this might help. You will need:
- git, to clone the GitHub repository
- C toolchain, to compile the Go compiler
If your Linux distro is based on Debian (Ubuntu, Raspbian, Mint, others):
$ sudo apt-get install git build-essential
Install the Go programming language version 1.4
$ git clone https://go.googlesource.com/go ~/go1.4
$ cd ~/go1.4/src
$ git checkout go1.4.3
$ ./all.bashInstall the Go programming language version 1.5 (this requires Go 1.4; long story)
$ git clone https://go.googlesource.com/go ~/go1.5
$ cd ~/go1.5/src
$ git checkout go1.5.1
$ ./all.bash$ echo ‘export GOPATH=$HOME/go’ >> ~/.profile
$ echo ‘PATH="$PATH:$HOME/go1.5/bin:$GOPATH/bin"’ >> ~/.profile
$ source ~/.profile
$ go version
go version go1.5.1 linux/arm