| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- ##
- ## nginx.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package information
- Name: nginx
- Summary: Reverse Proxy Server
- URL: http://nginx.org/
- Vendor: Igor Sysoev
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: EVAL
- Group: Web
- License: MIT-style
- Version: 1.1.13
- Release: 20120117
- # list of sources
- Source0: http://nginx.org/download/nginx-%{version}.tar.gz
- Source1: nginx.conf
- Source2: rc.nginx
- Patch0: nginx.patch
- # build information
- BuildPreReq: OpenPKG, openpkg >= 20100101
- PreReq: OpenPKG, openpkg >= 20100101
- BuildPreReq: zlib, pcre, openssl, geoip
- PreReq: zlib, pcre, openssl, geoip
- %description
- Nginx (pronounced "engine X" is a lightweight, event-driven
- high-performance Web server/reverse proxy and e-mail (IMAP/POP3)
- proxy. It provides the following HTTP features: Handling of static
- files, index files, and auto-indexing; Reverse proxy with caching;
- Load balancing; Fault tolerance; SSL support; FastCGI support with
- caching; Name- and IP-based virtual servers; FLV streaming; MP4
- streaming; Web page access authentication; gzip compression; and
- ability to handle more than 10.000 simultaneous connections.
- %track
- prog nginx = {
- version = %{version}
- url = http://nginx.org/en/download.html
- regex = nginx-(__VER__)\.tar\.gz
- }
- %prep
- %setup -q
- %patch -p0
- %build
- # configure program
- %{l_shtool} subst \
- -e 's;/usr/local;%{l_prefix};g' \
- auto/lib/*/conf
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- CPPFLAGS="%{l_cppflags}" \
- LDFLAGS="%{l_ldflags}" \
- ./configure \
- --prefix=%{l_prefix} \
- --conf-path=%{l_prefix}/etc/nginx/nginx.conf \
- --error-log-path=%{l_prefix}/var/nginx/log/nginx.log \
- --pid-path=%{l_prefix}/var/nginx/var/nginx.pid \
- --lock-path=%{l_prefix}/var/nginx/var/nginx.lck \
- --http-log-path=%{l_prefix}/var/nginx/log/nginx.access.log \
- --http-client-body-temp-path=%{l_prefix}/var/nginx/tmp \
- --http-proxy-temp-path=%{l_prefix}/var/nginx/tmp \
- --http-fastcgi-temp-path=%{l_prefix}/var/nginx/tmp \
- --http-uwsgi-temp-path=%{l_prefix}/var/nginx/tmp \
- --http-scgi-temp-path=%{l_prefix}/var/nginx/tmp \
- --user=%{l_nusr} \
- --group=%{l_ngrp} \
- --with-http_addition_module \
- --with-http_dav_module \
- --with-http_degradation_module \
- --with-http_flv_module \
- --with-http_geoip_module \
- --with-http_gzip_static_module \
- --with-http_random_index_module \
- --with-http_realip_module \
- --with-http_secure_link_module \
- --with-http_ssl_module \
- --with-http_stub_status_module \
- --with-http_sub_module
- # build program
- %{l_make} %{l_mflags -O}
- %install
- # install program
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
- # strip down installation
- strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
- # install default configuration
- rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/nginx/*
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/nginx
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE nginx.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/nginx/
- %{l_shtool} install -c -m 644 \
- conf/mime.types $RPM_BUILD_ROOT%{l_prefix}/etc/nginx/
- # install run-command script
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE rc.nginx} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # create run-time directories
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/var/nginx/tmp \
- $RPM_BUILD_ROOT%{l_prefix}/var/nginx/log \
- $RPM_BUILD_ROOT%{l_prefix}/var/nginx/run
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%config %{l_prefix}/etc/nginx/*' \
- '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/nginx/*'
- %files -f files
- %clean
|