From 3d712a7078e6cd85dc7f2961628bea46cfea5236 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 24 Dec 2019 17:59:44 +0300 Subject: Packages: making unit-go architecture independent. To support Go modules, the unit-go module should be platform independent. All platform-dependent logic is moved to libunit, so the unit-dev package should be installed before building unit-go. --- pkg/deb/Makefile | 17 +++------ pkg/deb/Makefile.go | 6 ++- pkg/deb/Makefile.go110 | 48 ------------------------ pkg/deb/Makefile.go111 | 48 ------------------------ pkg/deb/Makefile.go112 | 48 ------------------------ pkg/deb/Makefile.go113 | 48 ------------------------ pkg/deb/Makefile.go17 | 48 ------------------------ pkg/deb/Makefile.go18 | 48 ------------------------ pkg/deb/Makefile.go19 | 48 ------------------------ pkg/deb/debian.module/unit.example-go1.10-config | 15 -------- pkg/deb/debian.module/unit.example-go1.11-config | 15 -------- pkg/deb/debian.module/unit.example-go1.12-config | 15 -------- pkg/deb/debian.module/unit.example-go1.13-config | 15 -------- pkg/deb/debian.module/unit.example-go1.7-config | 15 -------- pkg/deb/debian.module/unit.example-go1.8-config | 15 -------- pkg/deb/debian.module/unit.example-go1.9-config | 15 -------- 16 files changed, 10 insertions(+), 454 deletions(-) delete mode 100644 pkg/deb/Makefile.go110 delete mode 100644 pkg/deb/Makefile.go111 delete mode 100644 pkg/deb/Makefile.go112 delete mode 100644 pkg/deb/Makefile.go113 delete mode 100644 pkg/deb/Makefile.go17 delete mode 100644 pkg/deb/Makefile.go18 delete mode 100644 pkg/deb/Makefile.go19 delete mode 100644 pkg/deb/debian.module/unit.example-go1.10-config delete mode 100644 pkg/deb/debian.module/unit.example-go1.11-config delete mode 100644 pkg/deb/debian.module/unit.example-go1.12-config delete mode 100644 pkg/deb/debian.module/unit.example-go1.13-config delete mode 100644 pkg/deb/debian.module/unit.example-go1.7-config delete mode 100644 pkg/deb/debian.module/unit.example-go1.8-config delete mode 100644 pkg/deb/debian.module/unit.example-go1.9-config (limited to 'pkg/deb') diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index 855dd6f7..788d5a1f 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -22,8 +22,7 @@ include Makefile.php include Makefile.python27 include Makefile.python37 include Makefile.python38 -include Makefile.go112 -include Makefile.go113 +include Makefile.go include Makefile.perl include Makefile.ruby include Makefile.jsc-common @@ -36,8 +35,7 @@ include Makefile.php include Makefile.python27 include Makefile.python37 include Makefile.python38 -include Makefile.go110 -include Makefile.go111 +include Makefile.go include Makefile.perl include Makefile.ruby include Makefile.jsc-common @@ -50,8 +48,7 @@ include Makefile.php include Makefile.python27 include Makefile.python36 include Makefile.python37 -include Makefile.go19 -include Makefile.go110 +include Makefile.go include Makefile.perl include Makefile.ruby include Makefile.jsc-common @@ -66,8 +63,7 @@ include Makefile.python27 include Makefile.python36 include Makefile.python37 include Makefile.python38 -include Makefile.go19 -include Makefile.go110 +include Makefile.go include Makefile.perl include Makefile.ruby include Makefile.jsc-common @@ -99,7 +95,7 @@ ifeq ($(CODENAME),buster) include Makefile.php include Makefile.python27 include Makefile.python37 -include Makefile.go111 +include Makefile.go include Makefile.perl include Makefile.ruby include Makefile.jsc-common @@ -111,8 +107,7 @@ ifeq ($(CODENAME),stretch) include Makefile.php include Makefile.python27 include Makefile.python35 -include Makefile.go17 -include Makefile.go18 +include Makefile.go include Makefile.perl include Makefile.ruby include Makefile.jsc-common diff --git a/pkg/deb/Makefile.go b/pkg/deb/Makefile.go index 3399f5ca..cdccb5ed 100644 --- a/pkg/deb/Makefile.go +++ b/pkg/deb/Makefile.go @@ -8,7 +8,7 @@ MODULE_RELEASE_go= 1 MODULE_CONFARGS_go= go --go-path=/usr/share/gocode MODULE_MAKEARGS_go= go -MODULE_INSTARGS_go= go-install +MODULE_INSTARGS_go= go-install-src MODULE_SOURCES_go= unit.example-go-app \ unit.example-go-config @@ -17,7 +17,9 @@ BUILD_DEPENDS_go= golang BUILD_DEPENDS+= $(BUILD_DEPENDS_go) MODULE_BUILD_DEPENDS_go=,golang -MODULE_DEPENDS_go=,golang +MODULE_DEPENDS_go=,golang,unit-dev (= $(VERSION)-$(RELEASE)~$(CODENAME)) + +MODULE_NOARCH_go= true define MODULE_PREINSTALL_go mkdir -p debian/unit-go/usr/share/doc/unit-go/examples/go-app diff --git a/pkg/deb/Makefile.go110 b/pkg/deb/Makefile.go110 deleted file mode 100644 index 0e956d9f..00000000 --- a/pkg/deb/Makefile.go110 +++ /dev/null @@ -1,48 +0,0 @@ -MODULES+= go110 -MODULE_SUFFIX_go110= go1.10 - -MODULE_SUMMARY_go110= Go 1.10 module for NGINX Unit - -MODULE_VERSION_go110= $(VERSION) -MODULE_RELEASE_go110= 1 - -MODULE_CONFARGS_go110= go --go=/usr/lib/go-1.10/bin/go --go-path=/usr/share/gocode -MODULE_MAKEARGS_go110= /usr/lib/go-1.10/bin/go -MODULE_INSTARGS_go110= /usr/lib/go-1.10/bin/go-install - -MODULE_SOURCES_go110= unit.example-go-app \ - unit.example-go1.10-config - -BUILD_DEPENDS_go110= golang-1.10 -BUILD_DEPENDS+= $(BUILD_DEPENDS_go110) - -MODULE_BUILD_DEPENDS_go110=,golang-1.10 -MODULE_DEPENDS_go110=,golang-1.10 - -define MODULE_PREINSTALL_go110 - mkdir -p debian/unit-go1.10/usr/share/doc/unit-go1.10/examples/go-app - install -m 644 -p debian/unit.example-go-app debian/unit-go1.10/usr/share/doc/unit-go1.10/examples/go-app/let-my-people.go - install -m 644 -p debian/unit.example-go1.10-config debian/unit-go1.10/usr/share/doc/unit-go1.10/examples/unit.config -endef -export MODULE_PREINSTALL_go110 - -define MODULE_POST_go110 -cat <