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