-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%define _sysconfdir /etc/%{name}
-%define _nginxdir /home/services/%{name}
-
-%description
-nginx ("engine x") is a high-performance HTTP server and reverse
-proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
-Sysoev for Rambler.ru, Russia's second-most visited website, where it
-has been running in production for over two and a half years. Igor has
-released the source code under a BSD-like license. Although still in
-beta, nginx is known for its stability, rich feature set, simple
-configuration, and low resource consumption.
-
-%description -l pl.UTF-8
-nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
-a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva na
-potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
-odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
-opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle w
-fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
-prostej konfiguracji oraz małej "zasobożerności".
-
-%package common
-Summary: nginx - common files
-Summary(pl.UTF-8): nginx - pliki wspólne
-Group: Networking/Daemons/HTTP
+%if %{with geoip}
+BuildRequires: GeoIP-devel
+%endif
+%if %{with gd}
+BuildRequires: gd-devel
+%endif
+%if %{with modsecurity}
+BuildRequires: lua-devel
+%endif
+%if %{with perl}
+BuildRequires: perl-CGI
+BuildRequires: perl-devel
+BuildRequires: python
+BuildRequires: rpm-perlprov
+%endif
+%if %{with ssl}
+BuildRequires: openssl-devel >= %{ssl_version}
+Requires: openssl >= %{ssl_version}
+%endif
+%if %{with xslt}
+BuildRequires: libxslt-devel
+%endif
+Provides: group(http)
+Provides: group(nginx)
+Provides: user(nginx)
+Provides: webserver
+Provides: webserver(access)
+Provides: webserver(alias)
+Provides: webserver(auth)
+Provides: webserver(expires)
+Provides: webserver(headers)
+Provides: webserver(indexfile)
+Provides: webserver(log)
+Provides: webserver(mime)
+Provides: webserver(reqtimeout)
+Provides: webserver(rewrite)
+Provides: webserver(setenv)
+Conflicts: logrotate < 3.8.0
+Requires(post,preun): /sbin/chkconfig
+Requires(post,preun,postun): systemd-units >= 38