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