# TODO # - bconds for modules as these are statically linked in # - logrotate script Summary: High perfomance HTTP and reverse proxy server Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności Name: nginx Version: 0.5.14 Release: 0.1 License: BSD-like Group: Networking/Daemons Source0: http://sysoev.ru/nginx/%{name}-%{version}.tar.gz # Source0-md5: 3415c2b49b66fae5b11ca348ec0c2605 Source1: %{name}.init Patch0: %{name}-config.patch URL: http://nginx.net/ BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: rpmbuild(macros) >= 1.268 BuildRequires: zlib-devel Requires(post,preun): /sbin/chkconfig Requires(postun): /usr/sbin/groupdel Requires(postun): /usr/sbin/userdel Requires(pre): /bin/id Requires(pre): /usr/bin/getgid Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/useradd Requires: rc-scripts BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir /etc/%{name} %description High perfomance HTTP and reverse proxy server. %description -l pl.UTF-8 Serwer HTTP i odwrotne proxy o wysokiej wydajności. %prep %setup -q %patch0 -p0 %build # NB: not autoconf generated configure ./configure \ --prefix=%{_prefix} \ --sbin-path=%{_sbindir}/%{name} \ --conf-path=%{_sysconfdir}/%{name}.conf \ --error-log-path=%{_localstatedir}/log/%{name}/error.log \ --pid-path=%{_localstatedir}/run/%{name}.pid \ --user=nobody \ --group=nobody \ --with-rtsig_module \ --with-select_module \ --with-poll_module \ --with-http_ssl_module \ --http-log-path=%{_localstatedir}/log/%{name}/access.log \ --http-client-body-temp-path=%{_localstatedir}/cache/%{name}/client_body_temp \ --http-proxy-temp-path=%{_localstatedir}/cache/%{name}/proxy_temp \ --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}/fastcgi_temp \ --with-imap \ --with-cc="%{__cc}" \ --with-cc-opt="%{rpmcflags}" \ --with-ld-opt="%{rpmldflags}" \ %{?debug:--with-debug} %{__make} %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sbindir},%{_sysconfdir},/var/{log/%{name},cache/%{name}}} install conf/* $RPM_BUILD_ROOT%{_sysconfdir} install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} install objs/%{name} $RPM_BUILD_ROOT%{_sbindir}/%{name} rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.default rm -rf $RPM_BUILD_ROOT%{_prefix}/html %clean rm -rf $RPM_BUILD_ROOT %pre %groupadd -r -g 213 %{name} %useradd -r -u 213 -d /usr/share/empty -s /bin/false -c "Nginx HTTP User" -g %{name} %{name} %post /sbin/chkconfig --add %{name} %service %{name} restart %preun if [ "$1" = "0" ]; then %service -q %{name} stop /sbin/chkconfig --del %{name} fi %postun if [ "$1" = "0" ]; then %userremove %{name} %groupremove %{name} fi %files %defattr(644,root,root,755) %doc CHANGES LICENSE README html/index.html conf/nginx.conf %doc %lang(ru) CHANGES.ru %attr(754,root,root) /etc/rc.d/init.d/%{name} %dir %attr(754,root,root) %{_sysconfdir} %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf %attr(640,root,root) %{_sysconfdir}/*[_-]* %attr(640,root,root) %{_sysconfdir}/mime.types %attr(755,root,root) %{_sbindir}/%{name} %attr(770,root,%{name}) /var/cache/%{name} %attr(750,%{name},logs) /var/log/%{name}