summaryrefslogtreecommitdiffhomepage
path: root/pkg/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/rpm')
-rw-r--r--pkg/rpm/Makefile8
-rw-r--r--pkg/rpm/unit.module.spec.in7
-rw-r--r--pkg/rpm/unit.spec.in9
3 files changed, 19 insertions, 5 deletions
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index 75327c49..e67846cf 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -8,6 +8,8 @@ DEFAULT_RELEASE := 1
VERSION ?= $(DEFAULT_VERSION)
RELEASE ?= $(DEFAULT_RELEASE)
+PACKAGE_VENDOR = NGINX Packaging <nginx-packaging@f5.com>
+
ifeq ($(shell test `rpm --eval '0%{?rhel} -eq 6 -a 0%{?amzn} -eq 0'`; echo $$?), 0)
OSVER = centos6
else ifeq ($(shell test `rpm --eval '0%{?rhel} -eq 7 -a 0%{?amzn} -eq 0'`; echo $$?), 0)
@@ -41,8 +43,12 @@ endif
ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed sles))
BUILD_DEPENDS_unit += libxml2-tools libxslt1 libopenssl-devel
else
+ifneq (,$(findstring $(OSVER),amazonlinux2))
+BUILD_DEPENDS_unit += libxml2 libxslt openssl11-devel
+else
BUILD_DEPENDS_unit += libxml2 libxslt openssl-devel
endif
+endif
BUILD_DEPENDS = $(BUILD_DEPENDS_unit)
@@ -201,6 +207,7 @@ rpmbuild/SPECS/unit.spec: unit.spec.in ../../docs/changes.xml | rpmbuild/SPECS
sed -e "s#%%VERSION%%#$(VERSION)#g" \
-e "s#%%RELEASE%%#$(RELEASE)#g" \
-e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS)#g" \
+ -e "s#%%PACKAGE_VENDOR%%#$(PACKAGE_VENDOR)#g" \
> rpmbuild/SPECS/unit.spec
cd ../../docs && make ../build/unit.rpm-changelog
ifneq ($(DEFAULT_VERSION)$(DEFAULT_RELEASE), $(VERSION)$(RELEASE))
@@ -248,6 +255,7 @@ rpmbuild/SPECS/unit-%.spec: unit.module.spec.in ../../docs/changes.xml | rpmbuil
-e "s#%%RELEASE%%#$(MODULE_RELEASE_$*)#g" \
-e "s#%%UNIT_VERSION%%#$(VERSION)#g" \
-e "s#%%UNIT_RELEASE%%#$(RELEASE)#g" \
+ -e "s#%%PACKAGE_VENDOR%%#$(PACKAGE_VENDOR)#g" \
-e "s#%%MODULE_SOURCES%%#$${sources}#g" \
-e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS)#g" \
-e "s#%%MODULE_CONFARGS%%#$(MODULE_CONFARGS_$*)#g" \
diff --git a/pkg/rpm/unit.module.spec.in b/pkg/rpm/unit.module.spec.in
index 39083e66..4f096c73 100644
--- a/pkg/rpm/unit.module.spec.in
+++ b/pkg/rpm/unit.module.spec.in
@@ -9,8 +9,12 @@
%if 0%{?rhel}%{?fedora}
BuildRequires: gcc
+%if 0%{?amzn2}
+BuildRequires: openssl11-devel
+%else
BuildRequires: openssl-devel
%endif
+%endif
%if 0%{?suse_version} >= 1315
BuildRequires: libopenssl-devel
@@ -28,9 +32,8 @@ Summary: %%SUMMARY%%
Version: %%VERSION%%
Release: %%RELEASE%%%{?dist}.ngx
License: ASL 2.0
-Vendor: Nginx Software, Inc.
+Vendor: %%PACKAGE_VENDOR%%
URL: https://unit.nginx.org/
-Packager: Nginx Software, Inc. <https://www.nginx.com>
Group: System Environment/Daemons
Source0: unit-%{version}.tar.gz
diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in
index 3a148b9d..b35b8998 100644
--- a/pkg/rpm/unit.spec.in
+++ b/pkg/rpm/unit.spec.in
@@ -4,8 +4,12 @@
%if 0%{?rhel}%{?fedora}
BuildRequires: gcc
+%if 0%{?amzn2}
+BuildRequires: openssl11-devel
+%else
BuildRequires: openssl-devel
%endif
+%endif
%if 0%{?rhel}
%if 0%{?amzn} == 0
@@ -29,9 +33,8 @@ Summary: NGINX Unit
Version: %%VERSION%%
Release: %%RELEASE%%%{?dist}.ngx
License: ASL 2.0
-Vendor: Nginx Software, Inc.
+Vendor: %%PACKAGE_VENDOR%%
URL: https://unit.nginx.org/
-Packager: Nginx Software, Inc. <https://www.nginx.com>
Group: System Environment/Daemons
Source0: unit-%{version}.tar.gz
@@ -203,7 +206,7 @@ BANNER
%dir %{_libdir}/unit/modules
%dir %{_libdir}/unit/debug-modules
%dir %{_sharedstatedir}/unit
-%dir %attr(0700,root,root) %{_localstatedir}/log/unit
+%dir %attr(0755,root,root) %{_localstatedir}/log/unit
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%{_mandir}/man8/unitd.8*