New semaphore package including all configs
This commit is contained in:
74
fedora/SPECS/semaphore.spec
Normal file
74
fedora/SPECS/semaphore.spec
Normal file
@@ -0,0 +1,74 @@
|
||||
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
|
||||
|
||||
%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 %{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(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
|
||||
* Sun Aug 12 2018 Daniel Steiner <daniel.steiner@greenmail.ch>
|
||||
- Initial build for Fedora 28
|
||||
Reference in New Issue
Block a user