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/rpm/Makefile.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/rpm/Makefile.go') diff --git a/pkg/rpm/Makefile.go b/pkg/rpm/Makefile.go index 09dffd21..8603e994 100644 --- a/pkg/rpm/Makefile.go +++ b/pkg/rpm/Makefile.go @@ -8,7 +8,7 @@ MODULE_RELEASE_go= 1 MODULE_CONFARGS_go= go --go-path=%{gopath} 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 @@ -25,11 +25,15 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go) ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed)) define MODULE_DEFINITIONS_go +BuildArch: noarch +Requires: unit-devel == $(VERSION)-$(RELEASE)%{?dist}.ngx BuildRequires: $(BUILD_DEPENDS_go) %define gopath /usr/share/go/contrib endef else define MODULE_DEFINITIONS_go +BuildArch: noarch +Requires: unit-devel == $(VERSION)-$(RELEASE)%{?dist}.ngx BuildRequires: $(BUILD_DEPENDS_go) endef endif -- cgit From 693a458b4ea87b7b387bd9d094de2b42be7ecdbd Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 25 Dec 2019 20:00:32 +0300 Subject: Go: changing import name for "unit.nginx.org/go". This patch includes packaging changes - update unit-go installation directory. --- pkg/rpm/Makefile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/rpm/Makefile.go') diff --git a/pkg/rpm/Makefile.go b/pkg/rpm/Makefile.go index 8603e994..e3891ab4 100644 --- a/pkg/rpm/Makefile.go +++ b/pkg/rpm/Makefile.go @@ -52,8 +52,8 @@ endef export MODULE_PREINSTALL_go define MODULE_FILES_go -%dir %{gopath}/src/nginx/unit -%{gopath}/src/nginx/unit/* +%dir %{gopath}/src/unit.nginx.org/go +%{gopath}/src/unit.nginx.org/go/* endef export MODULE_FILES_go -- cgit