!1 add bootupd source package and spec file
From: @fu-shanqing Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
16516b5a06
BIN
bootupd-0.2.5-vendor.tar.gz
Normal file
BIN
bootupd-0.2.5-vendor.tar.gz
Normal file
Binary file not shown.
BIN
bootupd-0.2.5.crate
Normal file
BIN
bootupd-0.2.5.crate
Normal file
Binary file not shown.
66
rust-bootupd.spec
Normal file
66
rust-bootupd.spec
Normal file
@ -0,0 +1,66 @@
|
||||
%global crate bootupd
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 0.2.5
|
||||
Release: 1
|
||||
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
|
||||
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
BuildRequires: make
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: rust-packaging
|
||||
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 Jan 17 2022 fushanqing <fushanqing@kylinos.cn> - 0.2.5-1
|
||||
- Initial package
|
||||
Loading…
x
Reference in New Issue
Block a user