Sat Mar 7 2020
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
%global steamuser steam
|
||||
|
||||
Name: kf2-srv
|
||||
Version: 0.6.0
|
||||
Version: 0.7.0
|
||||
Release: 1%{dist}
|
||||
Summary: Killing Floor 2 server
|
||||
Group: Amusements/Games
|
||||
@ -9,17 +9,28 @@ License: GNU GPLv3
|
||||
BuildArch: noarch
|
||||
|
||||
Source1: %{name}
|
||||
Source2: %{name}.conf
|
||||
Source2: %{name}-beta
|
||||
Source3: %{name}.xml
|
||||
Source4: %{name}@.service
|
||||
Source5: %{name}-update.service
|
||||
Source6: %{name}-update.timer
|
||||
Source7: main.conf.template
|
||||
Source8: %{name}-beta@.service
|
||||
Source9: %{name}-beta-update.service
|
||||
Source10: %{name}-beta-update.timer
|
||||
|
||||
Requires: systemd >= 219
|
||||
Requires: steamcmd
|
||||
Requires: libxml2
|
||||
Requires: dos2unix
|
||||
Requires: curl
|
||||
Requires: grep
|
||||
Requires: coreutils
|
||||
Requires: sed
|
||||
Requires: util-linux
|
||||
Requires: sudo
|
||||
Requires: psmisc
|
||||
Requires: gawk
|
||||
|
||||
Provides: %{name}
|
||||
|
||||
@ -37,29 +48,34 @@ install -m 755 -d %{buildroot}/%{_bindir}
|
||||
install -m 755 -d %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
install -m 755 -d %{buildroot}/%{_prefix}/lib/firewalld/services
|
||||
install -m 755 -d %{buildroot}/%{_sysconfdir}/%{name}/instances
|
||||
install -m 755 -d %{buildroot}/%{_sysconfdir}/%{name}/instances-beta
|
||||
install -m 644 -d %{buildroot}/%{_prefix}/games/%{name}
|
||||
install -m 644 -d %{buildroot}/%{_prefix}/games/%{name}-beta
|
||||
|
||||
install -m 755 %{SOURCE1} %{buildroot}/%{_bindir}
|
||||
install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}
|
||||
install -m 644 %{SOURCE3} %{buildroot}/%{_prefix}/lib/firewalld/services
|
||||
install -m 644 %{SOURCE4} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
install -m 644 %{SOURCE5} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
install -m 644 %{SOURCE6} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
install -m 644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/%{name}
|
||||
|
||||
sed -i -r "s|^(InstallDir=).*$|\1\"%{_prefix}/games/%{name}\"|g" %{buildroot}/%{_bindir}/%{name}
|
||||
install -m 755 %{SOURCE1} %{buildroot}/%{_bindir}
|
||||
install -m 644 %{SOURCE2} %{buildroot}/%{_bindir}
|
||||
install -m 644 %{SOURCE3} %{buildroot}/%{_prefix}/lib/firewalld/services
|
||||
install -m 644 %{SOURCE4} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
install -m 644 %{SOURCE5} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
install -m 644 %{SOURCE6} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
install -m 644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/%{name}
|
||||
install -m 644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
install -m 644 %{SOURCE9} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
install -m 644 %{SOURCE10} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%attr(775,root,%{steamuser}) %dir %{_prefix}/games/%{name}
|
||||
%attr(775,root,%{steamuser}) %dir %{_prefix}/games/%{name}-beta
|
||||
%attr(775,root,%{steamuser}) %dir %{_sysconfdir}/%{name}
|
||||
%attr(775,root,%{steamuser}) %dir %{_sysconfdir}/%{name}/instances
|
||||
%attr(644,root,root) %{_sysconfdir}/%{name}/main.conf.template
|
||||
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
||||
%attr(775,root,%{steamuser}) %dir %{_sysconfdir}/%{name}/instances-beta
|
||||
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/main.conf.template
|
||||
%attr(644,root,root) %config(noreplace) %{_prefix}/lib/firewalld/services/%{name}.xml
|
||||
%attr(755,root,root) %{_bindir}/%{name}
|
||||
%attr(755,root,root) %{_bindir}/%{name}-beta
|
||||
%attr(644,root,root) %{_prefix}/lib/systemd/system/*
|
||||
|
||||
%preun
|
||||
@ -67,9 +83,17 @@ if [[ $1 -eq 0 ]] ; then # Uninstall
|
||||
%{_bindir}/%{name} --stop
|
||||
%{_bindir}/%{name} --disable
|
||||
rm -rf %{_prefix}/games/%{name}/*
|
||||
rm -rf %{_prefix}/games/%{name}-beta/*
|
||||
rm -rf %{_sysconfdir}/%{name}/instances/default
|
||||
rm -rf %{_sysconfdir}/%{name}/instances-beta/default
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Sat Mar 7 2020 GenZmeY <genzmey@gmail.com> - 0.7.0-1
|
||||
- dual versions support;
|
||||
- check updates;
|
||||
- bugfixes.
|
||||
|
||||
* Sat Jan 18 2020 GenZmeY <genzmey@gmail.com> - 0.6.0-1
|
||||
- versions;
|
||||
- instance conf tweaks;
|
||||
|
Reference in New Issue
Block a user