From f5ef56260ba355496ee0dc271ae28333470ad88a Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 8 Aug 2015 00:05:20 +0300 Subject: [PATCH] Replace src/Makefile with git submodules Self-written Makefile did exactly the same task as git-submodule, so replace with this already got tool for simplicity. Signed-off-by: Sergey Matveev --- .gitmodules | 9 +++++++++ common.mk | 9 +++------ doc/sources.texi | 16 +++++++++++----- src/.gitignore | 2 -- src/Makefile | 18 ------------------ src/github.com/agl/ed25519 | 1 + src/github.com/bigeagle/water | 1 + src/golang.org/x/crypto | 1 + 8 files changed, 26 insertions(+), 31 deletions(-) create mode 100644 .gitmodules delete mode 100644 src/.gitignore delete mode 100644 src/Makefile create mode 160000 src/github.com/agl/ed25519 create mode 160000 src/github.com/bigeagle/water create mode 160000 src/golang.org/x/crypto diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f2d6ae4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "src/github.com/bigeagle/water"] + path = src/github.com/bigeagle/water + url = https://github.com/bigeagle/water.git +[submodule "src/github.com/agl/ed25519"] + path = src/github.com/agl/ed25519 + url = https://github.com/agl/ed25519.git +[submodule "src/golang.org/x/crypto"] + path = src/golang.org/x/crypto + url = https://go.googlesource.com/crypto diff --git a/common.mk b/common.mk index b2f01fe..874490b 100644 --- a/common.mk +++ b/common.mk @@ -7,16 +7,13 @@ DOCDIR = $(DESTDIR)$(PREFIX)/share/doc/govpn all: govpn-client govpn-server govpn-verifier -depends: - $(MAKE) -C src - -govpn-client: depends +govpn-client: GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-client -govpn-server: depends +govpn-server: GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-server -govpn-verifier: depends +govpn-verifier: GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-verifier bench: diff --git a/doc/sources.texi b/doc/sources.texi index 26bcd72..504b6bf 100644 --- a/doc/sources.texi +++ b/doc/sources.texi @@ -3,12 +3,17 @@ Development source contains the latest version of the code. It may be buggy. It does not contain compiled documentation and dependent -libraries source code. Because of that it is not recommended for porters. +libraries source code. Because of that it is not recommended for +porters: use prepared tarballs! -You can obtain it by cloning Git repository: -@code{git clone git://git.cypherpunks.ru/govpn.git}. -@code{src} directory has makefile that will download necessary dependent -library versions. +You can obtain it by cloning Git repository and fetching dependent +libraries source code as git submodules: + +@example +% git clone git://git.cypherpunks.ru/govpn.git govpn +% cd govpn +% git submodule update --init +@end example Also there is mirror of dependent libraries for safety if their native repositories will be unavailable (they are seldom updated): @@ -18,4 +23,5 @@ repositories will be unavailable (they are seldom updated): @item @code{govpn} @tab @url{https://github.com/stargrave/govpn.git} @item @code{golang.org/x/crypto} @tab @url{git://git.cypherpunks.ru/crypto.git} @item @code{github.com/agl/ed25519} @tab @url{git://git.cypherpunks.ru/ed25519.git} +@item @code{github.com/bigeagle/water} @tab @url{git://git.cypherpunks.ru/water.git} @end multitable diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 1fb92d9..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -github.com -golang.org diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 4fd0c40..0000000 --- a/src/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -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 2f3083f6163ef51179ad42ed523a18c9a1141467 diff --git a/src/github.com/agl/ed25519 b/src/github.com/agl/ed25519 new file mode 160000 index 0000000..d2b94fd --- /dev/null +++ b/src/github.com/agl/ed25519 @@ -0,0 +1 @@ +Subproject commit d2b94fd789ea21d12fac1a4443dd3a3f79cda72c diff --git a/src/github.com/bigeagle/water b/src/github.com/bigeagle/water new file mode 160000 index 0000000..36aebfe --- /dev/null +++ b/src/github.com/bigeagle/water @@ -0,0 +1 @@ +Subproject commit 36aebfeb35da4f1f6a975726716c6fc563c5c495 diff --git a/src/golang.org/x/crypto b/src/golang.org/x/crypto new file mode 160000 index 0000000..2f3083f --- /dev/null +++ b/src/golang.org/x/crypto @@ -0,0 +1 @@ +Subproject commit 2f3083f6163ef51179ad42ed523a18c9a1141467 -- 2.44.0