%define __jar_repack %{nil} Summary: UniFi SDN Controller Name: unifi Version: 5.8.30 Release: 1%{?dist} License: private Group: Applications/Internet URL: http://www.ubnt.com/unifi/unifi-ap/ Source0: https://www.ubnt.com/downloads/unifi/%{version}/UniFi.unix.zip#/UniFi-%{version}.unix.zip Source1: unifi.service BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: mongodb-server Requires: java-1.8.0 Requires: authbind Requires(post): systemd-units Requires(post): systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units BuildRequires: systemd-units %description The UniFi® Controller is a wireless network management software solution from Ubiquiti Networks™. It allows you to manage multiple wireless networks using a web browser. %pre getent group unifi > /dev/null || groupadd -r unifi getent passwd unifi > /dev/null || useradd -r -g unifi -d /opt/unifi -s /sbin/nologin -c "UniFi Controller user" unifi exit 0 %prep %setup -q -n UniFi %build %install mkdir -p %{buildroot}/opt/%{name} mkdir -p %{buildroot}%{_unitdir} cp -p -r . %{buildroot}/opt/%{name}/ install -m 0644 -p %{SOURCE1} %{buildroot}/%{_unitdir}/unifi.service %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_unitdir}/unifi.service %attr(-,unifi,unifi) /opt/%{name} %post %systemd_post unifi.service %preun %systemd_preun unifi.service %postun %systemd_postun_with_restart unifi.service %changelog * Wed Sep 12 2018 Billy Chan 5.8.30-1 - New upstream release