diff options
author | Andrei Belov <defan@nginx.com> | 2018-03-01 23:03:03 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2018-03-01 23:03:03 +0300 |
commit | 2d2b5048bc2150ed9abe7f0f24372442e277b738 (patch) | |
tree | 25e6c9361709b590b3276174d2218e14dec5a5f5 /pkg/rpm/Makefile.go | |
parent | 1f06ccb6d898b6dbb2506e4a893691a67da80130 (diff) | |
download | unit-2d2b5048bc2150ed9abe7f0f24372442e277b738.tar.gz unit-2d2b5048bc2150ed9abe7f0f24372442e277b738.tar.bz2 |
Packages: added openSUSE Leap, openSUSE Tumbleweed, SLES support.
Diffstat (limited to 'pkg/rpm/Makefile.go')
-rw-r--r-- | pkg/rpm/Makefile.go | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkg/rpm/Makefile.go b/pkg/rpm/Makefile.go index 1fc3dcb5..c979f097 100644 --- a/pkg/rpm/Makefile.go +++ b/pkg/rpm/Makefile.go @@ -15,17 +15,26 @@ MODULE_SOURCES_go= unit.example-go-app \ ifeq ($(OSVER), centos6) BUILD_DEPENDS_go= epel-release golang +else ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed)) +BUILD_DEPENDS_go= go1.9 else BUILD_DEPENDS_go= golang endif BUILD_DEPENDS+= $(BUILD_DEPENDS_go) +ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed)) define MODULE_DEFINITIONS_go - -BuildRequires: golang +BuildRequires: $(BUILD_DEPENDS_go) +BuildArch: noarch +%define gopath /usr/share/go/contrib +endef +else +define MODULE_DEFINITIONS_go +BuildRequires: $(BUILD_DEPENDS_go) BuildArch: noarch endef +endif export MODULE_DEFINITIONS_go define MODULE_PREINSTALL_go @@ -54,7 +63,7 @@ The $(MODULE_SUMMARY_go) has been installed. To check the sample app, run these commands: - GOPATH=/usr/share/gocode go build -o /tmp/go-app /usr/share/doc/unit-go/examples/go-app/let-my-people.go + GOPATH=%{gopath} go build -o /tmp/go-app /usr/share/doc/unit-go/examples/go-app/let-my-people.go sudo service unit start sudo service unit loadconfig /usr/share/doc/unit-go/examples/unit.config curl http://localhost:8500/ |