forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvesta-nginx.spec
More file actions
65 lines (53 loc) · 1.72 KB
/
Copy pathvesta-nginx.spec
File metadata and controls
65 lines (53 loc) · 1.72 KB
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
65
Name: vesta-nginx
Version: 0.9.8
Release: 17
Summary: Vesta Control Panel
Group: System Environment/Base
License: BSD-like
URL: http://vestacp.com/
Vendor: vestacp.com
Source0: %{name}-%{version}.tar.gz
Source1: nginx.conf
Source2: vesta.init
Requires: redhat-release >= 5
Provides: vesta-nginx
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
This package contains nginx webserver for Vesta Control Panel web interface.
%prep
%setup -q -n %{name}-%{version}
%build
./configure --prefix=/usr/local/vesta/nginx --with-http_ssl_module
make
%install
make install DESTDIR=%{buildroot} INSTALLDIRS=vendor
%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}/usr/local/vesta/nginx/conf/nginx.conf
%{__install} -p -D -m 0755 %{SOURCE2} %{buildroot}%{_initrddir}/vesta
%{__install} -p -D -m 0755 %{buildroot}/usr/local/vesta/nginx/sbin/nginx %{buildroot}/usr/local/vesta/nginx/sbin/vesta-nginx
%clean
rm -rf %{buildroot}
%post
/sbin/chkconfig --add vesta
%preun
if [ $1 = 0 ]; then
/sbin/service vesta stop >/dev/null 2>&1
/sbin/chkconfig --del vesta
fi
%postun
if [ $1 -ge 1 ]; then
if [ -e "/var/run/vesta-nginx.pid" ]; then
/sbin/service vesta restart > /dev/null 2>&1 || :
fi
fi
%files
%defattr(-,root,root)
%attr(755,root,root) /usr/local/vesta/nginx
%{_initrddir}/vesta
%config(noreplace) /usr/local/vesta/nginx/conf/nginx.conf
%changelog
* Wed Jul 30 2013 Serghey Rodin <builder@vestacp.com> - 0.9.8-1
- upgraded to nginx-1.4.2
* Sat Apr 06 2013 Serghey Rodin <builder@vestacp.com> - 0.9.7-2
- new init script
* Wed Jun 27 2012 Serghey Rodin <builder@vestacp.com> - 0.9.7-1
- initial build