Do not pull in systemd during build
%_systemd_util_dir was added to macros for exactly this purpose.
This commit is contained in:
parent
d2520be3c5
commit
4fbeb5cf62
@ -97,17 +97,16 @@ cp -a %{S:1} .
|
|||||||
%cargo_generate_buildrequires
|
%cargo_generate_buildrequires
|
||||||
echo '/usr/bin/make'
|
echo '/usr/bin/make'
|
||||||
echo '/usr/bin/ronn'
|
echo '/usr/bin/ronn'
|
||||||
echo 'pkgconfig(systemd)'
|
|
||||||
echo 'systemd-rpm-macros'
|
echo 'systemd-rpm-macros'
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export SYSTEMD_UTIL_DIR=$(pkg-config --variable=systemdutildir systemd)
|
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
|
||||||
%cargo_build
|
%cargo_build
|
||||||
make systemd_service
|
make systemd_service
|
||||||
LC_ALL=C.UTF-8 ronn --roff --organization="zram-generator %{version_no_tilde}" man/*.md
|
LC_ALL=C.UTF-8 ronn --roff --organization="zram-generator %{version_no_tilde}" man/*.md
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export SYSTEMD_UTIL_DIR=$(pkg-config --variable=systemdutildir systemd)
|
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
|
||||||
%cargo_install
|
%cargo_install
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_systemdgeneratordir}
|
mkdir -p %{buildroot}%{_systemdgeneratordir}
|
||||||
@ -119,7 +118,7 @@ install -Dpm0644 -t %{buildroot}%{_mandir}/man5 man/zram-generator.conf.5
|
|||||||
|
|
||||||
%if %{with check}
|
%if %{with check}
|
||||||
%check
|
%check
|
||||||
export SYSTEMD_UTIL_DIR=$(pkg-config --variable=systemdutildir systemd)
|
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
|
||||||
%cargo_test
|
%cargo_test
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user