-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-1.8.0.spec
64 lines (53 loc) · 1.45 KB
/
nginx-1.8.0.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Name: nginx
Version: 1.8.0
Release: 1
Summary: nginx rpm
Group: Library
License: GPL
Source0: %{name}-%{version}.tar.gz
%description
%prep
%setup -q
%build
./configure \
--prefix=/tools/nginx \
--with-pcre=/tmp/pcre-8.37 \
--with-zlib=/tmp/zlib-1.2.8 \
--conf-path=/tools/nginx/conf/nginx.conf \
--pid-path=/tools/nginx/run/run.pid \
--lock-path=/tools/nginx/run/run.lock \
--http-client-body-temp-path=/data/dataTemp/client_body_temp \
--http-proxy-temp-path=/data/dataTemp/proxy_temp \
--with-openssl=/tmp/openssl-1.0.2d \
--with-http_stub_status_module \
--with-http_gzip_static_module
make
%install
make install DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/tools/nginx/{ssl,sites-enabled}
mkdir -p $RPM_BUILD_ROOT/data/dataTemp/{client_body_temp,proxy_temp}
/bin/cp /tmp/bestpay.key $RPM_BUILD_ROOT/tools/nginx/ssl
/bin/cp /tmp/bestpay.pem $RPM_BUILD_ROOT/tools/nginx/ssl
%files
/tools/nginx/conf/*
/tools/nginx/html/*
/tools/nginx/sbin/*
/tools/nginx/ssl/*
%dir
/tools/nginx/ssl
/tools/nginx/sites-enabled
/tools/nginx/run
/tools/nginx/logs
/data/dataTemp/client_body_temp
/data/dataTemp/proxy_temp
%post
/bin/chown bestpay.bestpay -R /tools/nginx
/bin/chown bestpay.bestpay -R /data/dataTemp
ln -sf /tools/nginx/sbin/nginx /sbin/nginx
if [ ! -d /etc/nginx ];then
mkdir /etc/nginx
fi
ln -sf /tools/nginx/conf/nginx.conf /etc/nginx/nginx.conf
%changelog