# Generated by rust2rpm 27 %bcond check 0 # prevent library files from being installed %global cargo_install_lib 0 %global forgeurl https://github.com/twosigma/nsncd Name: nsncd Version: 1.5.2 %forgemeta Release: %autorelease Summary: Name service non-caching daemon SourceLicense: Apache-2.0 License: Unlicense URL: %{forgeurl} Source: %{forgesource} BuildRequires: cargo-rpm-macros >= 26, systemd-rpm-macros %global _description %{expand: The name service non-caching daemon.} %description %{_description} %prep %forgeautosetup %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install # install systemd unit mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_libexecdir} mv %{buildroot}%{_bindir}/nsncd %{buildroot}%{_libexecdir} install -m 0644 nsncd.service %{buildroot}%{_unitdir} sed -i -e "s|/usr/lib/nsncd|/usr/libexec/nsncd|g" %{buildroot}%{_unitdir}/nsncd.service %if %{with check} %check %cargo_test %endif %files %license LICENSE %license LICENSE.dependencies %doc README.md %{_libexecdir}/nsncd %{_unitdir}/nsncd.service %changelog %autochangelog