]>
Commit | Line | Data |
---|---|---|
f9e65082 ER |
1 | # TODO |
2 | # - bconds for modules as these are statically linked in | |
3 | # - initscript | |
4 | Summary: high perfomance http and reverse proxy server | |
5 | Name: nginx | |
6 | Version: 0.1.41 | |
7 | Release: 0.3 | |
8 | Epoch: 0 | |
9 | License: ASIS | |
10 | Group: Applications | |
11 | Source0: http://sysoev.ru/nginx/%{name}-%{version}.tar.gz | |
12 | # Source0-md5: 475ae6d06dd61dc93fdcaf1069d7db21 | |
13 | Patch0: %{name}-DESTDIR.patch | |
14 | URL: http://sysoev.ru/en/ | |
15 | %if %{with initscript} | |
16 | BuildRequires: rpmbuild(macros) >= 1.228 | |
17 | Requires(post,preun): rc-scripts | |
18 | Requires(post,preun): /sbin/chkconfig | |
19 | %endif | |
20 | BuildRequires: pcre-devel | |
21 | BuildRequires: openssl-devel | |
22 | BuildRequires: zlib-devel | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %define _sysconfdir /etc/%{name} | |
26 | ||
27 | %description | |
28 | high 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 | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %{__make} install \ | |
65 | DESTDIR=$RPM_BUILD_ROOT | |
66 | ||
67 | rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.default | |
68 | rm -rf $RPM_BUILD_ROOT%{_prefix}/html | |
69 | ||
70 | %clean | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %if %{with initscript} | |
74 | %post | |
75 | /sbin/chkconfig --add %{name} | |
76 | %service %{name} restart | |
77 | ||
78 | %preun | |
79 | if [ "$1" = "0" ]; then | |
80 | %service -q %{name} stop | |
81 | /sbin/chkconfig --del %{name} | |
82 | fi | |
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 |