]> Cypherpunks.ru repositories - govpn.git/commitdiff
Move source code to separate directory. Bind dependent libraries to commits
authorSergey Matveev <stargrave@stargrave.org>
Sat, 9 May 2015 20:49:21 +0000 (23:49 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 9 May 2015 20:52:19 +0000 (23:52 +0300)
Prepare to supply all dependent libraries together with GoVPN source
code. Move everything to src subdirectory. Write makefile that will
clone necessary repositories with specified commits.

Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
17 files changed:
makefile
src/.gitignore [new file with mode: 0644]
src/govpn/cmd/govpn-client/main.go [moved from cmd/govpn-client/main.go with 100% similarity]
src/govpn/cmd/govpn-server/main.go [moved from cmd/govpn-server/main.go with 100% similarity]
src/govpn/cmd/govpn-verifier/main.go [moved from cmd/govpn-verifier/main.go with 100% similarity]
src/govpn/common.go [moved from common.go with 100% similarity]
src/govpn/govpn.go [moved from govpn.go with 100% similarity]
src/govpn/handshake.go [moved from handshake.go with 100% similarity]
src/govpn/identify.go [moved from identify.go with 100% similarity]
src/govpn/stats.go [moved from stats.go with 100% similarity]
src/govpn/tap.go [moved from tap.go with 100% similarity]
src/govpn/tap_freebsd.go [moved from tap_freebsd.go with 100% similarity]
src/govpn/tap_linux.go [moved from tap_linux.go with 100% similarity]
src/govpn/transport.go [moved from transport.go with 100% similarity]
src/govpn/transport_test.go [moved from transport_test.go with 100% similarity]
src/govpn/verifier.go [moved from verifier.go with 100% similarity]
src/makefile [new file with mode: 0644]

index e5db1dabde20f91e8e9b7237e50b25a14be8918b..9dbdc546409e57ce1479fa2b2e7514ec08d7b82c 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,25 +1,23 @@
 .PHONY: govpn-client govpn-server govpn-verifier
 
+GOPATH=$(shell pwd)
+export GOPATH
+
 LDFLAGS=-X govpn.Version $(shell cat VERSION)
 
 all: govpn-client govpn-server govpn-verifier
 
-dependencies:
-       [ "$(shell uname)" = FreeBSD ] || go get github.com/bigeagle/water
-       go get golang.org/x/crypto/poly1305
-       go get golang.org/x/crypto/salsa20
-       go get golang.org/x/crypto/xtea
-       go get golang.org/x/crypto/pbkdf2
-       go get github.com/agl/ed25519
+depends:
+       $(MAKE) -C src
 
-govpn-client: dependencies
+govpn-client: depends
        go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-client
 
-govpn-server: dependencies
+govpn-server: depends
        go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-server
 
-govpn-verifier: dependencies
+govpn-verifier: depends
        go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-verifier
 
-bench: dependencies
-       GOMAXPROC=2 go test -bench .
+bench:
+       cd src/govpn ; GOMAXPROC=2 go test -bench .
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644 (file)
index 0000000..1fb92d9
--- /dev/null
@@ -0,0 +1,2 @@
+github.com
+golang.org
similarity index 100%
rename from common.go
rename to src/govpn/common.go
similarity index 100%
rename from govpn.go
rename to src/govpn/govpn.go
similarity index 100%
rename from handshake.go
rename to src/govpn/handshake.go
similarity index 100%
rename from identify.go
rename to src/govpn/identify.go
similarity index 100%
rename from stats.go
rename to src/govpn/stats.go
similarity index 100%
rename from tap.go
rename to src/govpn/tap.go
similarity index 100%
rename from tap_freebsd.go
rename to src/govpn/tap_freebsd.go
similarity index 100%
rename from tap_linux.go
rename to src/govpn/tap_linux.go
similarity index 100%
rename from transport.go
rename to src/govpn/transport.go
similarity index 100%
rename from verifier.go
rename to src/govpn/verifier.go
diff --git a/src/makefile b/src/makefile
new file mode 100644 (file)
index 0000000..452b23f
--- /dev/null
@@ -0,0 +1,18 @@
+GIT ?= git
+
+all: golang.org/x/crypto github.com/agl/ed25519 github.com/bigeagle/water
+
+github.com/bigeagle/water:
+       mkdir -p github.com/bigeagle
+       $(GIT) clone https://github.com/bigeagle/water.git github.com/bigeagle/water
+       cd github.com/bigeagle/water && $(GIT) checkout --force 36aebfeb35da4f1f6a975726716c6fc563c5c495
+
+github.com/agl/ed25519:
+       mkdir -p github.com/agl
+       $(GIT) clone https://github.com/agl/ed25519.git github.com/agl/ed25519
+       cd github.com/agl/ed25519 && $(GIT) checkout --force d2b94fd789ea21d12fac1a4443dd3a3f79cda72c
+
+golang.org/x/crypto:
+       mkdir -p golang.org/x
+       $(GIT) clone https://go.googlesource.com/crypto golang.org/x/crypto
+       cd golang.org/x/crypto && $(GIT) checkout --force 24ffb5feb3312a39054178a4b0a4554fc2201248