]> git.pld-linux.org Git - packages/nginx.git/blob - nginx.spec
- tabs in preamble
[packages/nginx.git] / nginx.spec
1 # TODO
2 # - bconds for modules as these are statically linked in
3 # - initscript
4 Summary:        High perfomance HTTP and reverse proxy server
5 Summary(pl.UTF-8):      Serwer HTTP i odwrotne proxy o wysokiej wydajności
6 Name:           nginx
7 Version:        0.5.10
8 Release:        1
9 License:        BSD-like
10 Group:          Applications
11 Source0:        http://sysoev.ru/nginx/nginx-0.5.10.tar.gz
12 # Source0-md5:  fb2a1656d63371b7f68ba36862110232
13 URL:            http://nginx.net/
14 %if %{with initscript}
15 BuildRequires:  rpmbuild(macros) >= 1.228
16 Requires(post,preun):   rc-scripts
17 Requires(post,preun):   /sbin/chkconfig
18 %endif
19 BuildRequires:  pcre-devel
20 BuildRequires:  openssl-devel
21 BuildRequires:  zlib-devel
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _sysconfdir /etc/%{name}
25
26 %description
27 High perfomance HTTP and reverse proxy server.
28
29 %description -l pl.UTF-8
30 Serwer HTTP i odwrotne proxy o wysokiej wydajności.
31
32 %prep
33 %setup -q
34
35 %build
36 # NB: not autoconf generated configure
37 ./configure \
38         --prefix=%{_prefix} \
39         --sbin-path=%{_sbindir}/%{name} \
40         --conf-path=%{_sysconfdir}/%{name}.conf \
41         --error-log-path=%{_localstatedir}/log/%{name}/error.log \
42         --pid-path=%{_localstatedir}/run/%{name}.pid \
43         --user=nobody \
44         --group=nobody \
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 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
64
65 cp -a conf/* $RPM_BUILD_ROOT%{_sysconfdir}
66
67 cp objs/%{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
68
69 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.default
70 rm -rf $RPM_BUILD_ROOT%{_prefix}/html
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %if %{with initscript}
76 %post
77 /sbin/chkconfig --add %{name}
78 %service %{name} restart
79
80 %preun
81 if [ "$1" = "0" ]; then
82         %service -q %{name} stop
83         /sbin/chkconfig --del %{name}
84 fi
85 %endif
86
87 %files
88 %defattr(644,root,root,755)
89 %doc CHANGES LICENSE README html/index.html conf/nginx.conf
90 %doc %lang(ru) CHANGES.ru
91 %dir %{_sysconfdir}
92 %{_sysconfdir}/koi-win
93 %{_sysconfdir}/mime.types
94 %{_sysconfdir}/nginx.conf
95 %attr(755,root,root) %{_sbindir}/nginx
This page took 0.091085 seconds and 3 git commands to generate.