Switch to go modules
This commit is contained in:
parent
b41922e5c8
commit
5d6083df7e
42
Gopkg.lock
generated
42
Gopkg.lock
generated
@ -1,42 +0,0 @@
|
|||||||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
|
||||||
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
name = "golang.org/x/crypto"
|
|
||||||
packages = [
|
|
||||||
"blake2s",
|
|
||||||
"chacha20poly1305",
|
|
||||||
"curve25519",
|
|
||||||
"internal/chacha20",
|
|
||||||
"poly1305"
|
|
||||||
]
|
|
||||||
revision = "ab813273cd59e1333f7ae7bff5d027d4aadf528c"
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
name = "golang.org/x/net"
|
|
||||||
packages = [
|
|
||||||
"bpf",
|
|
||||||
"internal/iana",
|
|
||||||
"internal/socket",
|
|
||||||
"ipv4",
|
|
||||||
"ipv6"
|
|
||||||
]
|
|
||||||
revision = "dfa909b99c79129e1100513e5cd36307665e5723"
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
name = "golang.org/x/sys"
|
|
||||||
packages = [
|
|
||||||
"cpu",
|
|
||||||
"unix"
|
|
||||||
]
|
|
||||||
revision = "c11f84a56e43e20a78cee75a7c034031ecf57d1f"
|
|
||||||
|
|
||||||
[solve-meta]
|
|
||||||
analyzer-name = "dep"
|
|
||||||
analyzer-version = 1
|
|
||||||
inputs-digest = "d85ae9d2b4afafc3d7535505c46368cbbbec350cf876616302c1bcf44f6ec103"
|
|
||||||
solver-name = "gps-cdcl"
|
|
||||||
solver-version = 1
|
|
15
Gopkg.toml
15
Gopkg.toml
@ -1,15 +0,0 @@
|
|||||||
[[constraint]]
|
|
||||||
branch = "master"
|
|
||||||
name = "golang.org/x/crypto"
|
|
||||||
|
|
||||||
[[constraint]]
|
|
||||||
branch = "master"
|
|
||||||
name = "golang.org/x/net"
|
|
||||||
|
|
||||||
[[constraint]]
|
|
||||||
branch = "master"
|
|
||||||
name = "golang.org/x/sys"
|
|
||||||
|
|
||||||
[prune]
|
|
||||||
go-tests = true
|
|
||||||
unused-packages = true
|
|
29
Makefile
29
Makefile
@ -10,11 +10,9 @@ $(shell printf 'package main\nconst UseTheKernelModuleInstead = 0xdeadbabe\n' >
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: wireguard-go
|
export GOPATH ?= $(CURDIR)/.gopath
|
||||||
|
|
||||||
export GOPATH := $(CURDIR)/.gopath
|
all: wireguard-go
|
||||||
export PATH := $(PATH):$(CURDIR)/.gopath/bin
|
|
||||||
GO_IMPORT_PATH := git.zx2c4.com/wireguard-go
|
|
||||||
|
|
||||||
version.go:
|
version.go:
|
||||||
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
|
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
|
||||||
@ -24,28 +22,13 @@ version.go:
|
|||||||
echo "$$ver" > $@ && \
|
echo "$$ver" > $@ && \
|
||||||
git update-index --assume-unchanged $@ || true
|
git update-index --assume-unchanged $@ || true
|
||||||
|
|
||||||
.gopath/.created:
|
wireguard-go: $(wildcard *.go) $(wildcard */*.go)
|
||||||
rm -rf .gopath
|
go build -v -o "$@"
|
||||||
mkdir -p $(dir .gopath/src/$(GO_IMPORT_PATH))
|
|
||||||
ln -s ../../.. .gopath/src/$(GO_IMPORT_PATH)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
vendor/.created: Gopkg.toml Gopkg.lock | .gopath/.created
|
|
||||||
command -v dep >/dev/null || go get -v github.com/golang/dep/cmd/dep
|
|
||||||
export PWD; cd .gopath/src/$(GO_IMPORT_PATH) && dep ensure -vendor-only -v
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
wireguard-go: $(wildcard *.go) $(wildcard */*.go) .gopath/.created vendor/.created version.go
|
|
||||||
go build -v $(GO_IMPORT_PATH)
|
|
||||||
|
|
||||||
install: wireguard-go
|
install: wireguard-go
|
||||||
@install -v -d "$(DESTDIR)$(BINDIR)" && install -v -m 0755 wireguard-go "$(DESTDIR)$(BINDIR)/wireguard-go"
|
@install -v -d "$(DESTDIR)$(BINDIR)" && install -v -m 0755 "$<" "$(DESTDIR)$(BINDIR)/wireguard-go"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f wireguard-go
|
rm -f wireguard-go
|
||||||
|
|
||||||
update-dep: | .gopath/.created
|
.PHONY: clean install version.go
|
||||||
command -v dep >/dev/null || go get -v github.com/golang/dep/cmd/dep
|
|
||||||
cd .gopath/src/$(GO_IMPORT_PATH) && dep ensure -update -v
|
|
||||||
|
|
||||||
.PHONY: clean install update-dep version.go
|
|
||||||
|
@ -48,7 +48,7 @@ This will run on OpenBSD. It does not yet support sticky sockets. Fwmark is mapp
|
|||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
This requires an installation of [go](https://golang.org) and of [dep](https://github.com/golang/dep). If dep is not installed, it will be downloaded and built as part of the build process.
|
This requires an installation of [go](https://golang.org) ≥ 1.11.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git clone https://git.zx2c4.com/wireguard-go
|
$ git clone https://git.zx2c4.com/wireguard-go
|
||||||
|
7
go.mod
Normal file
7
go.mod
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
module git.zx2c4.com/wireguard-go
|
||||||
|
|
||||||
|
require (
|
||||||
|
golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4
|
||||||
|
golang.org/x/net v0.0.0-20181005035420-146acd28ed58
|
||||||
|
golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e
|
||||||
|
)
|
6
go.sum
Normal file
6
go.sum
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4 h1:Vk3wNqEZwyGyei9yq5ekj7frek2u7HUfffJ1/opblzc=
|
||||||
|
golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
|
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 h1:otZG8yDCO4LVps5+9bxOeNiCvgmOyt96J3roHTYs7oE=
|
||||||
|
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e h1:EfdBzeKbFSvOjoIqSZcfS8wp0FBLokGBEs9lz1OtSg0=
|
||||||
|
golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
Loading…
Reference in New Issue
Block a user