-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
78 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,79 @@ | ||
%define name recodex-broker | ||
%define short_name broker | ||
%define version 1.2.2 | ||
%define unmangled_version aae209408c34eedcb7fe5345c0ed252526184183 | ||
%define name recodex-broker | ||
%define short_name broker | ||
%define version 1.3.0 | ||
%define unmangled_version 4baa6ade2d12151151a2865bb52ac4f118806d01 | ||
%define release 1 | ||
|
||
%define spdlog_name spdlog | ||
%define spdlog_version 0.13.0 | ||
|
||
Summary: ReCodEx broker component | ||
Name: %{name} | ||
Version: %{version} | ||
Release: %{release} | ||
License: MIT | ||
Group: Development/Libraries | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot | ||
Prefix: %{_prefix} | ||
Vendor: Petr Stefan <UNKNOWN> | ||
Url: https://github.com/ReCodEx/broker | ||
BuildRequires: systemd gcc-c++ cmake zeromq-devel cppzmq-devel yaml-cpp-devel libcurl-devel | ||
Requires(post): systemd | ||
Requires(preun): systemd | ||
Requires(postun): systemd | ||
|
||
#Source0: %{name}-%{unmangled_version}.tar.gz | ||
Source0: https://github.com/ReCodEx/%{short_name}/archive/%{unmangled_version}.tar.gz#/%{short_name}-%{unmangled_version}.tar.gz | ||
Source1: https://github.com/gabime/%{spdlog_name}/archive/v%{spdlog_version}.tar.gz#/%{spdlog_name}-%{spdlog_version}.tar.gz | ||
|
||
%description | ||
Backend part of ReCodEx programmer testing solution. | ||
|
||
%prep | ||
%setup -n %{short_name}-%{unmangled_version} | ||
# Unpack spdlog to the right location | ||
%setup -n %{short_name}-%{unmangled_version} -T -D -a 1 | ||
rmdir vendor/spdlog | ||
mv -f %{spdlog_name}-%{spdlog_version} vendor/spdlog | ||
|
||
%build | ||
%cmake -DDISABLE_TESTS=true . | ||
make %{?_smp_mflags} | ||
|
||
%install | ||
make install DESTDIR=%{buildroot} | ||
mkdir -p %{buildroot}/var/log/recodex | ||
|
||
%clean | ||
|
||
|
||
%post | ||
%systemd_post 'recodex-broker.service' | ||
|
||
%postun | ||
%systemd_postun_with_restart 'recodex-broker.service' | ||
|
||
%pre | ||
getent group recodex >/dev/null || groupadd -r recodex | ||
getent passwd recodex >/dev/null || useradd -r -g recodex -d %{_sysconfdir}/recodex -s /sbin/nologin -c "ReCodEx Code Examiner" recodex | ||
exit 0 | ||
|
||
%preun | ||
%systemd_preun 'recodex-broker.service' | ||
|
||
%files | ||
%defattr(-,root,root) | ||
%dir %attr(-,recodex,recodex) %{_sysconfdir}/recodex/broker | ||
%dir %attr(-,recodex,recodex) /var/log/recodex | ||
|
||
%{_bindir}/recodex-broker | ||
%config(noreplace) %attr(-,recodex,recodex) %{_sysconfdir}/recodex/broker/config.yml | ||
|
||
#%{_unitdir}/recodex-broker.service | ||
/lib/systemd/system/recodex-broker.service | ||
%attr(0755,root,root) /etc/munin/plugins/munin-broker | ||
|
||
%changelog | ||
|
||
|
||
%define spdlog_name spdlog | ||
%define spdlog_version 0.13.0 | ||
|
||
Summary: ReCodEx broker component | ||
Name: %{name} | ||
Version: %{version} | ||
Release: %{release} | ||
License: MIT | ||
Group: Development/Libraries | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot | ||
Prefix: %{_prefix} | ||
Vendor: Petr Stefan <UNKNOWN> | ||
Url: https://github.com/ReCodEx/broker | ||
BuildRequires: systemd gcc-c++ cmake zeromq-devel cppzmq-devel yaml-cpp-devel libcurl-devel | ||
Requires(post): systemd | ||
Requires(preun): systemd | ||
Requires(postun): systemd | ||
|
||
#Source0: %{name}-%{unmangled_version}.tar.gz | ||
Source0: https://github.com/ReCodEx/%{short_name}/archive/%{unmangled_version}.tar.gz#/%{short_name}-%{unmangled_version}.tar.gz | ||
Source1: https://github.com/gabime/%{spdlog_name}/archive/v%{spdlog_version}.tar.gz#/%{spdlog_name}-%{spdlog_version}.tar.gz | ||
|
||
%description | ||
Backend part of ReCodEx programmer testing solution. | ||
|
||
%prep | ||
%setup -n %{short_name}-%{unmangled_version} | ||
# Unpack spdlog to the right location | ||
%setup -n %{short_name}-%{unmangled_version} -T -D -a 1 | ||
rmdir vendor/spdlog | ||
mv -f %{spdlog_name}-%{spdlog_version} vendor/spdlog | ||
|
||
%build | ||
%cmake -DDISABLE_TESTS=true . | ||
make %{?_smp_mflags} | ||
|
||
%install | ||
make install DESTDIR=%{buildroot} | ||
mkdir -p %{buildroot}/var/log/recodex | ||
|
||
%clean | ||
|
||
|
||
%post | ||
%systemd_post 'recodex-broker.service' | ||
|
||
%postun | ||
%systemd_postun_with_restart 'recodex-broker.service' | ||
|
||
%pre | ||
getent group recodex >/dev/null || groupadd -r recodex | ||
getent passwd recodex >/dev/null || useradd -r -g recodex -d %{_sysconfdir}/recodex -s /sbin/nologin -c "ReCodEx Code Examiner" recodex | ||
exit 0 | ||
|
||
%preun | ||
%systemd_preun 'recodex-broker.service' | ||
|
||
%files | ||
%defattr(-,root,root) | ||
%dir %attr(-,recodex,recodex) %{_sysconfdir}/recodex/broker | ||
%dir %attr(-,recodex,recodex) /var/log/recodex | ||
|
||
%{_bindir}/recodex-broker | ||
%config(noreplace) %attr(-,recodex,recodex) %{_sysconfdir}/recodex/broker/config.yml | ||
|
||
#%{_unitdir}/recodex-broker.service | ||
/lib/systemd/system/recodex-broker.service | ||
%attr(0755,root,root) /etc/munin/plugins/munin-broker | ||
|
||
%changelog | ||
|
||
|
||
|