Browse Source

Update instalation from source docs

DarthSim 5 years ago
parent
commit
bb695fa2c4
1 changed files with 29 additions and 6 deletions
  1. 29 6
      docs/installation.md

+ 29 - 6
docs/installation.md

@@ -64,6 +64,31 @@ brew install imgproxy
 
 ## From the source
 
+You can get imgproxy source by clonning the GitHub repo:
+
+```bash
+git clone https://github.com/imgproxy/imgproxy.git
+cd imgproxy
+```
+
+...or by downloading the source tarball:
+
+```bash
+mkdir imgproxy
+cd imgproxy
+curl -Ls https://github.com/imgproxy/imgproxy/archive/master.tar.gz \
+  | tar -xz --strip-components 1 -C .
+```
+
+You can also download the specific version:
+
+```bash
+mkdir imgproxy
+cd imgproxy
+curl -Ls https://github.com/imgproxy/imgproxy/archive/v2.13.1.tar.gz \
+  | tar -xz --strip-components 1 -C .
+```
+
 ### Ubuntu
 
 First, install [libvips](https://github.com/libvips/libvips).
@@ -89,18 +114,16 @@ sudo apt-get install golang-go
 And finally, install imgproxy itself:
 
 ```bash
-GO111MODULE=on \
-  CGO_LDFLAGS_ALLOW="-s|-w" \
-  go get -u github.com/imgproxy/imgproxy/v2
+CGO_LDFLAGS_ALLOW="-s|-w" \
+  go build -o /usr/local/bin/imgproxy
 ```
 
 ### macOS + Homebrew
 
 ```bash
 brew install vips go
-GO111MODULE=on \
-  PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig" \
+PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig" \
   CGO_LDFLAGS_ALLOW="-s|-w" \
   CGO_CFLAGS_ALLOW="-Xpreprocessor" \
-  go get -u github.com/imgproxy/imgproxy/v2
+  go build -o /usr/local/bin/imgproxy
 ```