-
Notifications
You must be signed in to change notification settings - Fork 0
/
unifi.spec
57 lines (48 loc) · 1.38 KB
/
unifi.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
%define __os_install_post %{nil}
Name: unifi
Summary: Ubiquitu UniFi Controller
Version: 5.11.47
Release: 0%{dist}
Group: Applications/System
License: Proprietary
URL: http://www.ubnt.com/
Source: https://www.ubnt.com/downloads/unifi/%{version}/UniFi.unix.zip
Source1: unifi.service
Requires: rh-mongodb34-mongodb-server java
Packager: George Machitidze <[email protected]>
AutoReq: 0
AutoReqProv: no
Requires(post): systemd-units
Requires(preun): systemd-units
%description
UniFi Controller for Linux
%prep
%setup -q -n UniFi
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/opt/%{name}/
rm -f readme.txt
rm -f bin/mongod
ln -sf /opt/rh/rh-mongodb34/root/usr/bin/mongod bin/mongod
cp -a * $RPM_BUILD_ROOT/opt/%{name}/
install -D -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service
%clean
rm -rf $RPM_BUILD_ROOT
%post
rm -rf /opt/%{name}/work
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%files
%defattr(-,root,root)
/opt/%{name}/*
%{_unitdir}/%{name}.service
%changelog
* Fri Oct 04 2019 George Machitidze <[email protected]> - 5.11.47
- Switch to SCL mongodb34
* Sun Jun 28 2015 George Machitidze <[email protected]>
- Fix for ROOT problem
* Sat Dec 17 2014 George Machitidze <[email protected]>
- Workaround for webapps ROOT issue https://github.com/GioMac/SPEC/issues/1
* Fri Jan 17 2014 George Machitidze <[email protected]>
- Initial build