native-turbo/native-turbo.spec

114 lines
2.9 KiB
RPMSpec
Raw Normal View History

2023-05-16 19:13:39 +08:00
#needsrootforbuild
%global __cargo_skip_build 0
%global __cargo_common_opts %{?__cargo_common_opts} --all
2023-07-11 15:47:03 +08:00
Name: native-turbo
2023-04-07 20:05:16 +08:00
Version: 1.0.0
2023-06-12 15:31:20 +08:00
Release: 4
2023-04-07 20:05:16 +08:00
Summary: Numa Aware Scheduling
License: Mulan PSL v2
URL: https://gitee.com/openeuler/native-turbo
Source0: %{name}.tar.xz
BuildRequires: meson >= 0.49.2, clang >= 12.0.1
BuildRequires: make >= 4.0, bison >= 2.7, binutils >= 2.30-17, gcc >= 10.3.1
BuildRequires: ncurses-devel
%description
sysboost can merge ELF files to improve performance.
# Add devel subpackage
2023-07-11 15:47:03 +08:00
%package tools
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
BuildRequires: binutils
2023-07-11 15:47:03 +08:00
%description tools
The %{name}-tools package contains some tools of sysboost.
2023-04-24 19:37:41 +08:00
%prep
2023-04-07 20:05:16 +08:00
export RPM_BUILD_DIR=%_topdir/BUILD
export RPM_BUILD_SOURCE=%_topdir/SOURCES
tar -Jxf $RPM_BUILD_SOURCE/%{name}.tar.xz
cp $RPM_BUILD_SOURCE/objreloc.sh $RPM_BUILD_DIR/objreloc
2023-04-07 20:05:16 +08:00
%build
2023-05-16 19:13:39 +08:00
cd $RPM_BUILD_DIR/native-turbo
2023-04-24 19:37:41 +08:00
make release
make
2023-04-07 20:05:16 +08:00
%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
2023-06-12 15:31:20 +08:00
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
2023-07-11 15:47:03 +08:00
mkdir -p $RPM_BUILD_ROOT/usr/include/
2023-05-16 19:13:39 +08:00
pushd native-turbo/build
2023-07-11 15:47:03 +08:00
install -D -p -m 644 ./lib/libsi_array.a $RPM_BUILD_ROOT/%{_libdir}/libsi_array.a
install -D -p -m 644 ./lib/libsi_hashmap.a $RPM_BUILD_ROOT/%{_libdir}/libsi_hashmap.a
install -D -p -m 644 ./lib/libsi_ring.a $RPM_BUILD_ROOT/%{_libdir}/libsi_ring.a
install -D -p -m 644 ./lib/libsi_sys.a $RPM_BUILD_ROOT/%{_libdir}/libsi_sys.a
2023-05-16 19:13:39 +08:00
popd
2023-07-11 15:47:03 +08:00
pushd native-turbo
install -D -p -m 644 ./lib/sys/include/* $RPM_BUILD_ROOT/usr/include/
install -D -p -m 644 ./lib/hashmap/si_hashmap.h $RPM_BUILD_ROOT/usr/include/si_hashmap.h
install -D -p -m 644 ./lib/array/si_array.h $RPM_BUILD_ROOT/usr/include/si_array.h
install -D -p -m 644 ./lib/ring/si_ring_core.h $RPM_BUILD_ROOT/usr/include/si_ring_core.h
install -D -p -m 644 ./lib/ring/si_ring.h $RPM_BUILD_ROOT/usr/include/si_ring.h
2023-05-16 19:13:39 +08:00
popd
2023-04-24 19:37:41 +08:00
install -m 755 $RPM_BUILD_DIR/objreloc $RPM_BUILD_ROOT%{_bindir}/
2023-04-07 20:05:16 +08:00
%check
%files
2023-07-11 15:47:03 +08:00
%{_libdir}/*
/usr/include/*
%files tools
%defattr(0755,root,root)
%{_bindir}/objreloc
%doc
2023-04-07 20:05:16 +08:00
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%changelog
2023-06-12 15:31:20 +08:00
* Mon Jun 12 2023 liutie <liutie4@huawei.com> - 1.0.0-4
- Type:enhancement
- ID:NA
- SUG:NA
2023-07-11 15:47:03 +08:00
- DESC: create static libs and change devel subpackage name
2023-06-12 15:31:20 +08:00
2023-05-16 19:13:39 +08:00
* Tue May 16 2023 liutie <liutie4@huawei.com> - 1.0.0-3
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: Add sysboostd service for sysboost
* Mon May 8 2023 liutie <liutie4@huawei.com> - 1.0.0-2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: Independently generate the objreloc tool
* Mon May 8 2023 liutie <liutie4@huawei.com> - 1.0.0-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: Independently generate the objreloc tool
2023-05-16 19:13:39 +08:00
* Thu Apr 6 2023 liutie <liutie4@huawei.com> - 1.0.0-0
2023-07-11 15:47:03 +08:00
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: init