]> git.pld-linux.org Git - packages/nginx.git/blame - nginx.spec
- DESTDIR patch
[packages/nginx.git] / nginx.spec
CommitLineData
f9e65082
ER
1# TODO
2# - bconds for modules as these are statically linked in
3# - initscript
4Summary: high perfomance http and reverse proxy server
5Name: nginx
6Version: 0.1.41
7Release: 0.3
8Epoch: 0
9License: ASIS
10Group: Applications
11Source0: http://sysoev.ru/nginx/%{name}-%{version}.tar.gz
12# Source0-md5: 475ae6d06dd61dc93fdcaf1069d7db21
13Patch0: %{name}-DESTDIR.patch
14URL: http://sysoev.ru/en/
15%if %{with initscript}
16BuildRequires: rpmbuild(macros) >= 1.228
17Requires(post,preun): rc-scripts
18Requires(post,preun): /sbin/chkconfig
19%endif
20BuildRequires: pcre-devel
21BuildRequires: openssl-devel
22BuildRequires: zlib-devel
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%define _sysconfdir /etc/%{name}
26
27%description
28high perfomance http and reverse proxy server.
29
30%prep
31%setup -q
32%patch0 -p1
33
34%build
35# NB: not autoconf generated configure
36./configure \
37 --prefix=%{_prefix} \
38 --sbin-path=%{_sbindir}/%{name} \
39 --conf-path=%{_sysconfdir}/%{name}.conf \
40 --error-log-path=%{_localstatedir}/log/%{name}/error.log \
41 --pid-path=%{_localstatedir}/run/%{name}.pid \
42 --user=nobody \
43 --group=nobody \
44 --with-threads \
45 --with-rtsig_module \
46 --with-select_module \
47 --with-poll_module \
48 --with-http_ssl_module \
49 --http-log-path=%{_localstatedir}/log/%{name}/access.log \
50 --http-client-body-temp-path=%{_localstatedir}/cache/%{name}/client_body_temp \
51 --http-proxy-temp-path=%{_localstatedir}/cache/%{name}/proxy_temp \
52 --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}/fastcgi_temp \
53 --with-imap \
54 --with-cc="%{__cc}" \
55 --with-cc-opt="%{rpmcflags}" \
56 --with-ld-opt="%{rpmldflags}" \
57 %{?debug:--with-debug}
58
59%{__make}
60
61%install
62rm -rf $RPM_BUILD_ROOT
63
64%{__make} install \
65 DESTDIR=$RPM_BUILD_ROOT
66
67rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.default
68rm -rf $RPM_BUILD_ROOT%{_prefix}/html
69
70%clean
71rm -rf $RPM_BUILD_ROOT
72
73%if %{with initscript}
74%post
75/sbin/chkconfig --add %{name}
76%service %{name} restart
77
78%preun
79if [ "$1" = "0" ]; then
80 %service -q %{name} stop
81 /sbin/chkconfig --del %{name}
82fi
83%endif
84
85%files
86%defattr(644,root,root,755)
87%doc CHANGES LICENSE README html/index.html conf/nginx.conf
88%doc %lang(ru) CHANGES.ru
89%dir %{_sysconfdir}
90%{_sysconfdir}/koi-win
91%{_sysconfdir}/mime.types
92%{_sysconfdir}/nginx.conf
93%attr(755,root,root) %{_sbindir}/nginx
This page took 0.085361 seconds and 4 git commands to generate.