Search
SailfishOS Open Build Service
>
Projects
>
home:r0kk3rz
>
nginx
> nginx.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nginx.spec of Package nginx
# # spec file for package nginx # # Copyright (c) 2014 SUSE LINUX Products 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. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkg_name nginx %define ngx_prefix %{_prefix} %define ngx_sbin_path %{_sbindir}/nginx %define ngx_conf_dir %{_sysconfdir}/nginx %define ngx_conf_path %{ngx_conf_dir}/nginx.conf %define ngx_log_dir %{_localstatedir}/log/nginx %define ngx_error_log %{ngx_log_dir}/error.log %define ngx_access_log %{ngx_log_dir}/access.log %define ngx_pid_path /run/nginx.pid %define ngx_lock_path /run/nginx.lock %define ngx_home %{_localstatedir}/lib/nginx %define ngx_tmp_http %{ngx_home}/tmp/ %define ngx_tmp_proxy %{ngx_home}/proxy/ %define ngx_tmp_fcgi %{ngx_home}/fastcgi/ %define ngx_tmp_scgi %{ngx_home}/scgi/ %define ngx_tmp_uwsgi %{ngx_home}/uwsgi/ %define ngx_user_group nginx %define with_cpp_test 0 %define with_fancyindex 1 %define fancyindex_version 0.3.3 Name: nginx Version: 1.6.2 Release: 0 Summary: A HTTP server and IMAP/POP3 proxy server License: BSD-2-Clause Group: Productivity/Networking/Web/Proxy Url: http://nginx.org/ Source: http://nginx.org/download/nginx-%{version}.tar.gz Source1: nginx.init Source2: nginx.logrotate Source3: nginx.service Source4: https://github.com/aperezdc/ngx-fancyindex/archive/v%{fancyindex_version}.zip Source100: nginx.rpmlintrc BuildRequires: gcc-c++ BuildRequires: libxslt-devel BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: pkgconfig BuildRequires: zlib-devel BuildRequires: systemd %if 0%{?with_fancyindex} BuildRequires: unzip %endif Conflicts: nginx-0.5 nginx-0.6 nginx-0.7 nginx-0.8 nginx-0.9 nginx-1.0 nginx-1.2 nginx-1.3 nginx-1.4 nginx-1.5 nginx-1.7 Provides: nginx-1.6 = %{version} Provides: http_daemon Provides: httpd BuildRoot: %{_tmppath}/%{name}-%{version}-build %description nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev. It has been running on many heavily loaded Russian sites for more than two years. Author: ------- Igor Sysoev %prep %if 0%{?with_fancyindex} %setup -q -n %{pkg_name}-%{version} -b4 %else %setup -q -n %{pkg_name}-%{version} %endif %if 0%{with_fancyindex} mkdir -p ngx-fancyindex-%{fancyindex_version} pushd ../ngx-fancyindex-%{fancyindex_version} cp -r template* LICENSE *.rst $RPM_BUILD_DIR/%{pkg_name}-%{version}/ngx-fancyindex-%{fancyindex_version}/ popd %endif %build ./configure \ --prefix=%{ngx_prefix}/ \ --sbin-path=%{ngx_sbin_path} \ --conf-path=%{ngx_conf_path} \ --error-log-path=%{ngx_error_log} \ --http-log-path=%{ngx_access_log} \ --pid-path=%{ngx_pid_path} \ --lock-path=%{ngx_lock_path} \ --http-client-body-temp-path=%{ngx_tmp_http} \ --http-proxy-temp-path=%{ngx_tmp_proxy} \ --http-fastcgi-temp-path=%{ngx_tmp_fcgi} \ --http-uwsgi-temp-path=%{ngx_tmp_uwsgi} \ --http-scgi-temp-path=%{ngx_tmp_scgi} \ --user=nginx --group=nginx \ --without-select_module \ --without-poll_module make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %{?_smp_mflags} install -d -m 0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi} install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name} ln -s -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name} install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service rm %{buildroot}/usr/html/index.html rm %{buildroot}/usr/html/50x.html %post %fillup_and_insserv %{pkg_name} %if 0%{?with_systemd} %service_add_post nginx.service %endif %preun %stop_on_removal %{pkg_name} %service_del_preun nginx.service %postun %restart_on_update %{pkg_name} %insserv_cleanup %if 0%{?with_systemd} %service_del_postun nginx.service %endif %pre %{_sbindir}/groupadd -r %{ngx_user_group} &>/dev/null ||: %{_sbindir}/useradd -g %{ngx_user_group} -s /bin/false -r -c "user for %{ngx_user_group}" -d %{ngx_home} %{ngx_user_group} &>/dev/null ||: %if 0%{?with_systemd} %service_add_pre nginx.service %endif %files %defattr(-,root,root) %dir %{ngx_conf_dir}/ %config(noreplace) %{ngx_conf_dir}/koi-utf %config(noreplace) %{ngx_conf_dir}/koi-win %config(noreplace) %{ngx_conf_dir}/fastcgi_params %config %{ngx_conf_dir}/fastcgi_params.default %config(noreplace) %{ngx_conf_dir}/mime.types %config %{ngx_conf_dir}/mime.types.default %config(noreplace) %{ngx_conf_dir}/nginx.conf %config %{ngx_conf_dir}/nginx.conf.default %config(noreplace) %{ngx_conf_dir}/fastcgi.conf %config %{ngx_conf_dir}/fastcgi.conf.default %config(noreplace) %{ngx_conf_dir}/win-utf %config(noreplace) %{ngx_conf_dir}/scgi_params %config %{ngx_conf_dir}/scgi_params.default %config(noreplace) %{ngx_conf_dir}/uwsgi_params %config %{ngx_conf_dir}/uwsgi_params.default %{ngx_sbin_path} %{_sysconfdir}/init.d/%{pkg_name} %{_sbindir}/rc%{pkg_name} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{_localstatedir}/log/nginx/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_http} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_proxy} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_fcgi} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_scgi} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_uwsgi} %doc CHANGES* %doc conf/ contrib/ %if 0%{with_fancyindex} %doc ngx-fancyindex-%{fancyindex_version}/ %endif %{_unitdir}/nginx.service %changelog