]> git.pld-linux.org Git - packages/nginx.git/blame_incremental - nginx.spec
- added with-http_stub_status_module
[packages/nginx.git] / nginx.spec
... / ...
CommitLineData
1# TODO
2# - bconds for modules as these are statically linked in
3# - logrotate script
4Summary: High perfomance HTTP and reverse proxy server
5Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
6Name: nginx
7Version: 0.5.31
8Release: 2
9License: BSD-like
10Group: Networking/Daemons
11Source0: http://sysoev.ru/nginx/%{name}-%{version}.tar.gz
12# Source0-md5: d84ef8e624b8953faf9cee2b5da535c1
13Source1: %{name}.init
14Source2: %{name}-mime.types.sh
15Patch0: %{name}-config.patch
16URL: http://nginx.net/
17BuildRequires: mailcap
18BuildRequires: openssl-devel
19BuildRequires: pcre-devel
20BuildRequires: rpmbuild(macros) >= 1.268
21BuildRequires: zlib-devel
22Requires(post,preun): /sbin/chkconfig
23Requires(postun): /usr/sbin/groupdel
24Requires(postun): /usr/sbin/userdel
25Requires(pre): /bin/id
26Requires(pre): /usr/bin/getgid
27Requires(pre): /usr/sbin/groupadd
28Requires(pre): /usr/sbin/useradd
29Requires: rc-scripts
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%define _sysconfdir /etc/%{name}
33
34%description
35High perfomance HTTP and reverse proxy server.
36
37%description -l pl.UTF-8
38Serwer HTTP i odwrotne proxy o wysokiej wydajności.
39
40%prep
41%setup -q
42%patch0 -p0
43
44# build mime.types.conf
45sh %{SOURCE2} /etc/mime.types
46
47%build
48# NB: not autoconf generated configure
49./configure \
50 --prefix=%{_prefix} \
51 --sbin-path=%{_sbindir}/%{name} \
52 --conf-path=%{_sysconfdir}/%{name}.conf \
53 --error-log-path=%{_localstatedir}/log/%{name}/error.log \
54 --pid-path=%{_localstatedir}/run/%{name}.pid \
55 --user=nginx \
56 --group=nginx \
57 --with-rtsig_module \
58 --with-select_module \
59 --with-poll_module \
60 --with-http_ssl_module \
61 --with-http_stub_status_module \
62 --http-log-path=%{_localstatedir}/log/%{name}/access.log \
63 --http-client-body-temp-path=%{_localstatedir}/cache/%{name}/client_body_temp \
64 --http-proxy-temp-path=%{_localstatedir}/cache/%{name}/proxy_temp \
65 --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}/fastcgi_temp \
66 --with-imap \
67 --with-cc="%{__cc}" \
68 --with-cc-opt="%{rpmcflags}" \
69 --with-ld-opt="%{rpmldflags}" \
70 %{?debug:--with-debug}
71
72%{__make}
73
74%install
75rm -rf $RPM_BUILD_ROOT
76install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sbindir},%{_sysconfdir},/var/{log/%{name},cache/%{name}}}
77
78install conf/* $RPM_BUILD_ROOT%{_sysconfdir}
79install mime.types $RPM_BUILD_ROOT%{_sysconfdir}/mime.types
80install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
81
82install objs/%{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
83
84rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.default
85rm -rf $RPM_BUILD_ROOT%{_prefix}/html
86
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%pre
91%groupadd -r -g 213 %{name}
92%useradd -r -u 213 -d /usr/share/empty -s /bin/false -c "Nginx HTTP User" -g %{name} %{name}
93
94%post
95/sbin/chkconfig --add %{name}
96%service %{name} restart
97
98%preun
99if [ "$1" = "0" ]; then
100 %service -q %{name} stop
101 /sbin/chkconfig --del %{name}
102fi
103
104%postun
105if [ "$1" = "0" ]; then
106 %userremove %{name}
107 %groupremove %{name}
108fi
109
110%files
111%defattr(644,root,root,755)
112%doc CHANGES LICENSE README html/index.html conf/nginx.conf
113%doc %lang(ru) CHANGES.ru
114%attr(754,root,root) /etc/rc.d/init.d/%{name}
115%dir %attr(754,root,root) %{_sysconfdir}
116%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
117%attr(640,root,root) %{_sysconfdir}/*[_-]*
118%attr(640,root,root) %{_sysconfdir}/mime.types
119%attr(755,root,root) %{_sbindir}/%{name}
120%attr(770,root,%{name}) /var/cache/%{name}
121%attr(750,%{name},logs) /var/log/%{name}
This page took 0.082493 seconds and 4 git commands to generate.