rust-bootupd/rust-bootupd.spec
DistroBaker 84fd47f0a3 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/rust-bootupd.git#c6cf7f6492e0d943e8471f86719df89eed587f6a
2020-11-02 23:26:01 +00:00

90 lines
2.1 KiB
RPMSpec

%bcond_without check
%global __cargo_skip_build 0
%global crate bootupd
Name: rust-%{crate}
Version: 0.2.0
Release: 3%{?dist}
Summary: Bootloader updater
License: ASL 2.0
URL: https://crates.io/crates/bootupd
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
# For now, see upstream
ExclusiveArch: x86_64 aarch64
BuildRequires: openssl-devel
%if 0%{?rhel} && !0%{?eln}
BuildRequires: rust-toolset
%else
BuildRequires: rust-packaging
%endif
BuildRequires: systemd
%global _description %{expand:
Bootloader updater}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
License: ASL 2.0
%{?systemd_requires}
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%doc README.md
%{_bindir}/bootupctl
%{_libexecdir}/bootupd
%{_unitdir}/*
%prep
%autosetup -n %{crate}-%{version} -p1
tar xvf %{SOURCE1}
mkdir -p .cargo
cat >.cargo/config << EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
%build
%cargo_build
%install
%make_install INSTALL="install -p -c"
%post -n %{crate}
%systemd_post bootupd.service bootupd.socket
%preun -n %{crate}
%systemd_preun bootupd.service bootupd.socket
%postun -n %{crate}
%systemd_postun bootupd.service bootupd.socket
%changelog
* Mon Nov 2 23:03:03 UTC 2020 Colin Walters <walters@verbum.org> - 0.2.0-3
- Switch to vendored sources since RHEL requires it
* Mon Oct 26 15:06:37 UTC 2020 Colin Walters <walters@verbum.org> - 0.2.0-2
- https://github.com/coreos/bootupd/releases/tag/v0.2.0
* Tue Oct 13 2020 Colin Walters <walters@verbum.org> - 0.1.3-2
- https://github.com/coreos/bootupd/releases/tag/v0.1.3
* Tue Sep 22 2020 Colin Walters <walters@verbum.org> - 0.1.2-2
- New upstream
* Mon Sep 21 2020 Colin Walters <walters@verbum.org> - 0.1.1-2
- Also build on aarch64
* Fri Sep 11 2020 Colin Walters <walters@verbum.org> - 0.1.0-3
- Initial package