forked from alerta/angular-alerta-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalerta-webui.spec
50 lines (41 loc) · 1.26 KB
/
alerta-webui.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
%{!?_with_teamcity: %define version 3.0.0}
%{!?_with_teamcity: %define release 1}
%define prefix /var/www/alerta
Name: alerta-webui
Summary: Alerta WebUI
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
License: Apache License 2.0
Group: Utilities/System
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{prefix}
BuildArch: noarch
Vendor: Nick Satterly <[email protected]>
Url: https://github.com/alerta/angular-alerta-webui
Requires: httpd, alerta-server
%description
Alerta Web UI is the frontend for the Alerta monitoring system.
%prep
%setup -q
%install
%__mkdir_p %{buildroot}%{prefix}
cp -r %{_builddir}/%{name}-%{version}/app/* %{buildroot}%{prefix}
%__mkdir_p %{buildroot}%{_sysconfdir}/httpd/conf.d/
cat > %{buildroot}%{_sysconfdir}/httpd/conf.d/alerta-webui.conf << EOF
<VirtualHost *:80>
ProxyPass /api http://localhost:8080
ProxyPassReverse /api http://localhost:8080
DocumentRoot %{prefix}
</VirtualHost>
EOF
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/httpd/conf.d/alerta-webui.conf
%config(noreplace) %{prefix}/config.js
%{prefix}
%changelog
* Thu Mar 12 2015 Nick Satterly <[email protected]> - 3.0.0-1
- Update RPM SPEC file for Release 3