sysmaster/sysmaster.spec
Yangyang Shen 22cb3fb0e7 support compatible compile with rust 1.60
(cherry picked from commit c712b53f7e1e6f4f189a459deff675e096440f1f)
2023-06-16 16:59:56 +08:00

94 lines
3.3 KiB
RPMSpec

#needsrootforbuild
%global __cargo_skip_build 0
%global _debugsource_packages 1
%global _debuginfo_subpackages 1
%define _unpackaged_files_terminate_build 0
%global sysmaster_install_source target/release
%global sysmaster_install_target %{buildroot}/usr/lib/sysmaster
%global unit_install_source units
%global conf_install_source config/conf
%global __cargo_common_opts %{?__cargo_common_opts} --all
Name: sysmaster
Version: 0.2.3
Release: 2
Summary: redesign and reimplement process1.
License: Mulan PSL v2
URL: https://gitee.com/openeuler/sysmaster
Source0: %{name}-%{version}.tar.gz
Patch0001: backport-fix-compatible-with-rustc-1.60.patch
ExclusiveArch: x86_64 aarch64
BuildRequires: rust
BuildRequires: cargo
BuildRequires: rust-packaging
BuildRequires: gcc clang util-linux-devel
%description
redesign and reimplement process1.
Summary: %{summary}
%prep
%autosetup -p1
%cargo_prep
%cargo_generate_buildrequires
%build
sed -i '/\[source.crates-io\]/{n;d}' ./.cargo/config
sed -i '/\[source.local-registry\]/{n;d}' ./.cargo/config
sed -i '/\[source.local-registry\]/a directory = "vendor"' ./.cargo/config
%cargo_build
%install
install -Dm0550 -t %{buildroot}/usr/bin %{sysmaster_install_source}/sctl
install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/init
install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/sysmaster
install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/fstab
install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/sysmonitor
install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/random_seed
install -Dm0550 -t %{sysmaster_install_target} %{sysmaster_install_source}/rc-local-generator
#install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/basic.target
#install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/Multi-user.target
#install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/shutdown.target
#install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/sysinit.target
install -Dm0640 -t %{sysmaster_install_target} %{unit_install_source}/*
install -Dm0550 -t %{sysmaster_install_target}/plugin %{sysmaster_install_source}/libmount.so
install -Dm0550 -t %{sysmaster_install_target}/plugin %{sysmaster_install_source}/libservice.so
install -Dm0550 -t %{sysmaster_install_target}/plugin %{sysmaster_install_source}/libsocket.so
install -Dm0550 -t %{sysmaster_install_target}/plugin %{sysmaster_install_source}/libtarget.so
install -Dm0640 -t %{sysmaster_install_target}/plugin %{conf_install_source}/plugin.conf
%files
/usr/bin/sctl
/usr/lib/sysmaster/*
%changelog
* Tue May 30 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.3-2
- Support compatible compile with rust 1.60
* Sat May 6 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.3-1
- update version to 0.2.3
* Tue Sep 20 2022 licunlong<licunlong1@huawei.com> - 0.2.1-2
- rename process1 to sysmaster, and remove pctrl to /usr/bin
* Tue Sep 13 2022 licunlong<licunlong1@huawei.com> - 0.2.1-1
- sync patches from upstream
* Mon Aug 22 2022 He Xiaowen <hexiaowen@huawei.com> - 0.2.0-2
- strip the libraries
* Mon Aug 22 2022 He Xiaowen <hexiaowen@huawei.com> - 0.2.0-1
- initial package