File nginx.spec of Package nginx-1.19.5
#
# spec file for SUSE CAP buildpack dependency
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
Name: nginx-1.19.5
Version: 1.19.5
Release: 1
Summary: This is a dependency used in SUSE CAP buildpacks
License: BSD-2-Clause
Group: Cloud/Platform/scf
Url: http://nginx.org
Source0: http://nginx.org/download/nginx-1.19.5.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# BEGIN shared macros for all dependency packages
BuildRequires: aaa_stack_build_requires
%if 0%{?suse_version} == 1315
%define stack sle12
%else
%define stack sle15
%endif
%define otherdir %{_topdir}/OTHER
%define prefix_path /app/vendor/%{name}
%define destdir /tmp/%{name}
%define dependencydir %{destdir}%{prefix_path}
# END shared macros
%define prefix_path /nginx
%description
%prep
%setup -q -n %{name}
%build
./configure --prefix=/ \
--error-log-path=stderr \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_auth_request_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--without-http_uwsgi_module \
--without-http_scgi_module \
--with-pcre \
--with-pcre-jit \
--with-cc-opt="-fPIC -pie" \
--with-ld-opt="-fPIC -pie -z now" \
--with-compat \
--with-stream=dynamic \
--with-http_sub_module
make %{?_smp_mflags}
make install DESTDIR=%{dependencydir}
%install
pushd %{dependencydir}/
TARBALL=%{otherdir}/%{name}.tgz
rm -rf html conf
mkdir conf
tar czf ${TARBALL} * --owner=0 --group=0
popd
CHECKSUM=`sha256sum ${TARBALL}`
NEW_TARBALL=%{otherdir}/%{name}-linux-x64-%{stack}-${CHECKSUM:0:8}.tgz
mv ${TARBALL} ${NEW_TARBALL}
echo `sha256sum ${NEW_TARBALL}` > %{otherdir}/$(basename ${NEW_TARBALL}).sha256
%files
%defattr(-,root,root)
%changelog