]> git.pld-linux.org Git - packages/nginx.git/blame - nginx.spec
- bugfix
[packages/nginx.git] / nginx.spec
CommitLineData
f9e65082
ER
1# TODO
2# - bconds for modules as these are statically linked in
f1fc9780 3# - logrotate script
4
5%bcond_with initscript # initscript
6
8e1389c7 7Summary: High perfomance HTTP and reverse proxy server
185313bb 8Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
f9e65082 9Name: nginx
f1fc9780 10Version: 0.5.14
11Release: 0.1
51ef519b 12License: BSD-like
f9e65082 13Group: Applications
f1fc9780 14Source0: http://sysoev.ru/nginx/%{name}-%{version}.tar.gz
15# Source0-md5: 3415c2b49b66fae5b11ca348ec0c2605
16Source1: %{name}.init
17Patch0: %{name}-config.patch
51ef519b 18URL: http://nginx.net/
f1fc9780 19Requires(post,preun): /sbin/chkconfig
20Requires(postun): /usr/sbin/groupdel
21Requires(postun): /usr/sbin/userdel
22Requires(pre): /bin/id
23Requires(pre): /usr/bin/getgid
24Requires(pre): /usr/sbin/groupadd
25Requires(pre): /usr/sbin/useradd
f9e65082
ER
26%if %{with initscript}
27BuildRequires: rpmbuild(macros) >= 1.228
f9e65082 28Requires(post,preun): /sbin/chkconfig
f1fc9780 29Requires(post,preun): rc-scripts
f9e65082 30%endif
f9e65082 31BuildRequires: openssl-devel
f1fc9780 32BuildRequires: pcre-devel
f9e65082
ER
33BuildRequires: zlib-devel
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%define _sysconfdir /etc/%{name}
37
38%description
8e1389c7
JB
39High perfomance HTTP and reverse proxy server.
40
390f5b88
JR
41%description -l pl.UTF-8
42Serwer HTTP i odwrotne proxy o wysokiej wydajności.
f9e65082
ER
43
44%prep
45%setup -q
f1fc9780 46%patch0 -p0
f9e65082
ER
47
48%build
49# NB: not autoconf generated configure
50./configure \
51 --prefix=%{_prefix} \
52 --sbin-path=%{_sbindir}/%{name} \
53 --conf-path=%{_sysconfdir}/%{name}.conf \
54 --error-log-path=%{_localstatedir}/log/%{name}/error.log \
55 --pid-path=%{_localstatedir}/run/%{name}.pid \
56 --user=nobody \
57 --group=nobody \
f9e65082
ER
58 --with-rtsig_module \
59 --with-select_module \
60 --with-poll_module \
61 --with-http_ssl_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
f1fc9780 76install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sbindir},%{_sysconfdir},/var/{log/%{name},cache/%{name}}}
f9e65082 77
f1fc9780 78install conf/* $RPM_BUILD_ROOT%{_sysconfdir}
79install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
057a558d 80
f1fc9780 81install objs/%{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
f9e65082
ER
82
83rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.default
84rm -rf $RPM_BUILD_ROOT%{_prefix}/html
85
86%clean
87rm -rf $RPM_BUILD_ROOT
88
f1fc9780 89%pre
90%groupadd -r -g 212 %{name}
91%useradd -r -u 212 -d /usr/share/empty -s /bin/false -c "Nginx HTTP User" -g %{name} %{name}
92
f9e65082
ER
93%if %{with initscript}
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%endif
104
f1fc9780 105%postun
106if [ "$1" = "0" ]; then
107 %userremove %{name}
108 %groupremove %{name}
109fi
110
111
f9e65082
ER
112%files
113%defattr(644,root,root,755)
114%doc CHANGES LICENSE README html/index.html conf/nginx.conf
115%doc %lang(ru) CHANGES.ru
f1fc9780 116%attr(754,root,root) /etc/rc.d/init.d/%{name}
117%dir %attr(754,root,root) %{_sysconfdir}
118%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
119%attr(640,root,root) %{_sysconfdir}/*[_-]*
120%attr(640,root,root) %{_sysconfdir}/mime.types
121%attr(755,root,root) %{_sbindir}/%{name}
122%attr(770,root,%{name}) /var/cache/%{name}
123%attr(750,%{name},logs) /var/log/%{name}
This page took 0.047662 seconds and 4 git commands to generate.