82 lines
1.9 KiB
RPMSpec
82 lines
1.9 KiB
RPMSpec
Name: semaphore
|
|
Version: 2.5.1
|
|
Release: 1%{?dist}
|
|
Summary: Open Source alternative to Ansible Tower
|
|
|
|
Group: Development/Tools
|
|
License: MIT
|
|
URL: https://github.com/ansible-semaphore/semaphore
|
|
Source0: %{name}-%{version}.tar.gz
|
|
Source1: %{name}-systemd
|
|
Source2: %{name}-config.json
|
|
Source3: %{name}-sysconfig
|
|
Source4: check-port-connection.sh
|
|
|
|
%define user %name
|
|
%define group %name
|
|
|
|
#BuildRequires:
|
|
#Requires:
|
|
|
|
%description
|
|
Open Source alternative to Ansible Tower
|
|
|
|
%prep
|
|
tar xzf %{S:0}
|
|
|
|
%install
|
|
install -D %name %{buildroot}%{_bindir}/%name
|
|
install -D %{S:1} %{buildroot}%{_unitdir}/%name.service
|
|
install -D %{S:2} %{buildroot}%{_sysconfdir}/%name/config.json
|
|
install -D %{S:3} %{buildroot}%{_sysconfdir}/sysconfig/%name
|
|
install -D %{S:4} %{buildroot}/opt/jobs/check-port-connection.sh
|
|
install -d %{buildroot}%{_rundir}/%name
|
|
install -d %{buildroot}%{_var}/ansible
|
|
|
|
%pre
|
|
getent group %{group} > /dev/null || groupadd -r %{group}
|
|
getent passwd %{user} > /dev/null || \
|
|
useradd -r -d /home/%name -g %{user} \
|
|
-s /sbin/nologin -c "Semaphore user" %{user}
|
|
exit 0
|
|
|
|
%post
|
|
%if 0%{?using_systemd}
|
|
%if 0%{?systemd_macro_scriptlet}
|
|
%systemd_post %{name}.service
|
|
%endif
|
|
%endif
|
|
|
|
%postun
|
|
%if 0%{?using_systemd}
|
|
%if 0%{?systemd_macro_scriptlet}
|
|
%systemd_preun %{name}.service
|
|
%endif
|
|
%endif
|
|
|
|
%preun
|
|
%if 0%{?using_systemd}
|
|
%if 0%{?systemd_macro_scriptlet}
|
|
%systemd_preun %name.service
|
|
%endif
|
|
%endif
|
|
|
|
|
|
%files
|
|
%license LICENSE
|
|
%attr(755,%user,%group) %{_bindir}/%name
|
|
%attr(755,root,root) /opt/jobs/check-port-connection.sh
|
|
%attr(644,%user,%group) %{_unitdir}/%name.service
|
|
%attr(640,%user,%group) %config(noreplace) %{_sysconfdir}/%name/config.json
|
|
%attr(640,%user,%group) %config %{_sysconfdir}/sysconfig/%name
|
|
%attr(750,%user,%group) %dir %{_var}/ansible
|
|
|
|
|
|
%changelog
|
|
* Mon Aug 20 2018 Daniel Steiner <daniel.steiner@greenmail.ch>
|
|
- Pre exec script added for systemctl to check db availability.
|
|
|
|
* Sun Aug 12 2018 Daniel Steiner <daniel.steiner@greenmail.ch>
|
|
- Initial build for Fedora 28
|
|
|