diff options
Diffstat (limited to '')
-rw-r--r-- | pkg/rpm/Makefile | 8 | ||||
-rw-r--r-- | pkg/rpm/Makefile.go | 10 | ||||
-rw-r--r-- | pkg/rpm/Makefile.python27 | 9 | ||||
-rw-r--r-- | pkg/rpm/Makefile.python36 | 2 | ||||
-rw-r--r-- | pkg/rpm/Makefile.python37 | 2 | ||||
-rw-r--r-- | pkg/rpm/rpmbuild/SOURCES/unit.example-go-app | 2 |
6 files changed, 24 insertions, 9 deletions
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile index 4e970e45..34f79bcc 100644 --- a/pkg/rpm/Makefile +++ b/pkg/rpm/Makefile @@ -57,7 +57,8 @@ endif ifeq ($(OSVER), centos7) include Makefile.php -include Makefile.python +include Makefile.python27 +include Makefile.python36 include Makefile.go include Makefile.perl include Makefile.jsc-common @@ -90,7 +91,8 @@ endif ifeq ($(OSVER), amazonlinux2) include Makefile.php -include Makefile.python +include Makefile.python27 +include Makefile.python37 include Makefile.go include Makefile.perl include Makefile.jsc-common @@ -202,7 +204,7 @@ endif rpmbuild/SOURCES/unit-$(VERSION).tar.gz: cd ../.. && tar -czf pkg/rpm/rpmbuild/SOURCES/unit-$(VERSION).tar.gz \ --transform "s#^#unit-$(VERSION)/#" \ - LICENSE NOTICE CHANGES README configure auto src test version + LICENSE NOTICE CHANGES README configure auto src test version go unit: check-build-depends-unit rpmbuild/SPECS/unit.spec rpmbuild/SOURCES/unit-$(VERSION).tar.gz @echo "===> Building $@ package" ; \ diff --git a/pkg/rpm/Makefile.go b/pkg/rpm/Makefile.go index 09dffd21..e3891ab4 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 @@ -48,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 diff --git a/pkg/rpm/Makefile.python27 b/pkg/rpm/Makefile.python27 index 95b392a9..079a8512 100644 --- a/pkg/rpm/Makefile.python27 +++ b/pkg/rpm/Makefile.python27 @@ -17,12 +17,21 @@ ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed sles)) BUILD_DEPENDS_python27= python-devel else ifneq (,$(findstring $(OSVER),fedora centos8)) BUILD_DEPENDS_python27= python2-devel +else ifneq (,$(findstring $(OSVER),centos7 amazonlinux2)) +BUILD_DEPENDS_python27= python-devel else BUILD_DEPENDS_python27= python27-devel endif BUILD_DEPENDS+= $(BUILD_DEPENDS_python27) +define MODULE_DEFINITIONS_python27 +%if (0%{?rhel} == 7) || (0%{?amzn} == 2) +Obsoletes: unit-python +%endif +endef +export MODULE_DEFINITIONS_python27 + define MODULE_PREINSTALL_python27 %{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python27/examples/python-app %{__install} -m 644 -p %{SOURCE100} \ diff --git a/pkg/rpm/Makefile.python36 b/pkg/rpm/Makefile.python36 index 25e33968..827d2253 100644 --- a/pkg/rpm/Makefile.python36 +++ b/pkg/rpm/Makefile.python36 @@ -13,7 +13,7 @@ MODULE_INSTARGS_python36= python3.6-install MODULE_SOURCES_python36= unit.example-python-app \ unit.example-python36-config -ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora)) +ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora centos7)) BUILD_DEPENDS_python36= python3-devel else BUILD_DEPENDS_python36= python36-devel diff --git a/pkg/rpm/Makefile.python37 b/pkg/rpm/Makefile.python37 index ed9462b8..563d4539 100644 --- a/pkg/rpm/Makefile.python37 +++ b/pkg/rpm/Makefile.python37 @@ -13,7 +13,7 @@ MODULE_INSTARGS_python37= python3.7-install MODULE_SOURCES_python37= unit.example-python-app \ unit.example-python37-config -ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora)) +ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora amazonlinux2)) BUILD_DEPENDS_python37= python3-devel else BUILD_DEPENDS_python37= python37-devel diff --git a/pkg/rpm/rpmbuild/SOURCES/unit.example-go-app b/pkg/rpm/rpmbuild/SOURCES/unit.example-go-app index 7ca0c9fd..6eec1dbb 100644 --- a/pkg/rpm/rpmbuild/SOURCES/unit.example-go-app +++ b/pkg/rpm/rpmbuild/SOURCES/unit.example-go-app @@ -3,7 +3,7 @@ package main import ( "fmt" "net/http" - "nginx/unit" + "unit.nginx.org/go" ) func handler(w http.ResponseWriter, r *http.Request) { |