2023-11-10 11:57:53 +08:00
|
|
|
|
%define debug_package %{nil}
|
|
|
|
|
|
%global openHarmony_source_release OpenHarmony-v3.2-Release
|
|
|
|
|
|
%global samgr_dir %{_builddir}/foundation/systemabilitymgr
|
|
|
|
|
|
%global build_opt /opt/distributed-middleware-build
|
|
|
|
|
|
%global safwk_path %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/systemabilitymgr/safwk
|
|
|
|
|
|
|
|
|
|
|
|
Name: systemabilitymgr_safwk
|
|
|
|
|
|
Version: 1.0.0
|
2023-12-18 20:10:28 +08:00
|
|
|
|
Release: 2
|
2023-11-10 11:57:53 +08:00
|
|
|
|
Summary: System ability manager
|
2023-12-18 20:10:28 +08:00
|
|
|
|
License: Apache-2.0
|
2023-11-10 11:57:53 +08:00
|
|
|
|
Url: https://gitee.com/openharmony/systemabilitymgr_safwk
|
|
|
|
|
|
Source1: https://gitee.com/openharmony/systemabilitymgr_safwk/repository/archive/%{openHarmony_source_release}.tar.gz #/systemabilitymgr_safwk-%{openHarmony_source_release}.tar.gz
|
|
|
|
|
|
Source2: safwk.bundle.json
|
2023-12-18 20:10:28 +08:00
|
|
|
|
Source3: innerkits.safwk.BUILD.gn
|
2023-11-10 11:57:53 +08:00
|
|
|
|
Source4: services.safwk.BUILD.gn
|
2023-12-18 20:10:28 +08:00
|
|
|
|
Source5: start_services.sh
|
|
|
|
|
|
Source6: stop_services.sh
|
2023-11-10 11:57:53 +08:00
|
|
|
|
|
|
|
|
|
|
Patch1: 0000-remove-dependency-on-hitrace-safwk.patch
|
|
|
|
|
|
|
2024-03-06 11:11:32 +08:00
|
|
|
|
BuildRequires: gcc, make, hilog, libboundscheck
|
|
|
|
|
|
BuildRequires: libatomic,libicu-devel, libxml2-devel, cjson-devel
|
2023-11-10 11:57:53 +08:00
|
|
|
|
BuildRequires: distributed-build, distributed-beget
|
|
|
|
|
|
BuildRequires: commonlibrary_c_utils
|
|
|
|
|
|
BuildRequires: notification_eventhandler
|
|
|
|
|
|
BuildRequires: communication_ipc
|
2023-12-13 09:35:57 +00:00
|
|
|
|
BuildRequires: systemabilitymgr_samgr
|
2023-11-10 11:57:53 +08:00
|
|
|
|
|
|
|
|
|
|
Requires: commonlibrary_c_utils
|
2023-12-18 20:10:28 +08:00
|
|
|
|
Requires: distributed-beget
|
|
|
|
|
|
Requires: notification_eventhandler
|
2023-11-10 11:57:53 +08:00
|
|
|
|
Requires: communication_ipc
|
|
|
|
|
|
Requires: systemabilitymgr_samgr
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
OpenEuler supports samgr for distributed softbus capability
|
|
|
|
|
|
%prep
|
|
|
|
|
|
rm -rf %{_builddir}/*
|
|
|
|
|
|
|
|
|
|
|
|
cp -rf %{build_opt} %{_builddir}/build
|
|
|
|
|
|
[ ! -L "%{_builddir}/build.sh" ] && ln -s %{_builddir}/build/build_scripts/build.sh %{_builddir}/build.sh
|
|
|
|
|
|
[ ! -L "%{_builddir}/.gn" ] && ln -s %{_builddir}/build/core/gn/dotfile.gn %{_builddir}/.gn
|
|
|
|
|
|
[ ! -L "%{_builddir}/build.py" ] && ln -s %{_builddir}/build/lite/build.py %{_builddir}/build.py
|
|
|
|
|
|
cp -rf %{_builddir}/build/openeuler/vendor %{_builddir}/
|
|
|
|
|
|
cp -rf %{_builddir}/build/openeuler/compiler_gn/* %{_builddir}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 统一用setup,不用autosetup,distributed-build除外
|
|
|
|
|
|
mkdir -p %{samgr_dir}
|
|
|
|
|
|
%setup -q -D -T -a 1 -c -n %{samgr_dir}
|
|
|
|
|
|
# patch命令统一使用-P来指定第几个patch
|
|
|
|
|
|
%patch -P1 -p1 -d %{samgr_dir}/safwk
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
rm -rf %{_builddir}/out
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
|
|
bash %{_builddir}/build.sh --product-name openeuler --target-cpu x86_64
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
|
bash %{_builddir}/build.sh --product-name openeuler --target-cpu arm64
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
install -d -m 0755 %{buildroot}/%{_includedir}/safwk
|
|
|
|
|
|
install -d -m 0755 %{buildroot}/%{_libdir}
|
|
|
|
|
|
install -d -m 0755 %{buildroot}/%{_bindir}
|
|
|
|
|
|
install -d -m 0755 %{buildroot}/system/bin/
|
|
|
|
|
|
install -d -m 0755 %{safwk_path}/interfaces/innerkits/safwk
|
|
|
|
|
|
install -d -m 0755 %{safwk_path}/services/safwk
|
|
|
|
|
|
|
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
|
module_out_path="out/openeuler/linux_clang_arm64"
|
|
|
|
|
|
%endif
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
|
|
module_out_path="out/openeuler/linux_clang_x86_64"
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
# prepare so
|
|
|
|
|
|
install -m 0755 %{_builddir}/${module_out_path}/systemabilitymgr/safwk/*.so %{buildroot}/%{_libdir}
|
|
|
|
|
|
|
|
|
|
|
|
# prepare bin
|
|
|
|
|
|
install -m 0755 %{_builddir}/${module_out_path}/systemabilitymgr/safwk/sa_main %{buildroot}/%{_bindir}
|
|
|
|
|
|
install -m 0755 %{_builddir}/${module_out_path}/systemabilitymgr/safwk/sa_main %{buildroot}/system/bin/
|
2023-12-18 20:10:28 +08:00
|
|
|
|
install -m 0755 %{SOURCE5} %{buildroot}/system/bin/
|
|
|
|
|
|
install -m 0755 %{SOURCE6} %{buildroot}/system/bin/
|
2023-11-10 11:57:53 +08:00
|
|
|
|
|
|
|
|
|
|
# prepare head files
|
|
|
|
|
|
install -m 554 %{samgr_dir}/safwk/services/safwk/include/*.h %{buildroot}/%{_includedir}/safwk
|
|
|
|
|
|
install -m 554 %{samgr_dir}/safwk/interfaces/innerkits/safwk/*.h %{buildroot}/%{_includedir}/safwk
|
|
|
|
|
|
# cp json file
|
|
|
|
|
|
install -m 554 %{SOURCE2} %{safwk_path}/bundle.json
|
|
|
|
|
|
|
|
|
|
|
|
# cp gn file
|
|
|
|
|
|
install -m 554 %{SOURCE3} %{safwk_path}/interfaces/innerkits/safwk/BUILD.gn
|
|
|
|
|
|
install -m 554 %{SOURCE4} %{safwk_path}/services/safwk/BUILD.gn
|
|
|
|
|
|
|
|
|
|
|
|
#create soft link
|
|
|
|
|
|
ln -s /usr/include/safwk/system_ability.h %{safwk_path}/interfaces/innerkits/safwk/system_ability.h
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
|
%{_includedir}/safwk/*
|
|
|
|
|
|
%{_libdir}/*.so
|
|
|
|
|
|
%{_bindir}/sa_main
|
2023-12-18 20:10:28 +08:00
|
|
|
|
/system/*
|
2023-11-10 11:57:53 +08:00
|
|
|
|
%{build_opt}/*
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-12-18 20:10:28 +08:00
|
|
|
|
* Mon Dec 18 2023 Peng He <hepeng68@huawei.com> - 1.0.0-2
|
|
|
|
|
|
- Add shell scripts for services start/stop
|
|
|
|
|
|
|
2023-11-10 11:57:53 +08:00
|
|
|
|
* Thu Oct 12 2023 muyuying <muyuying1@huawei.com> - 1.0.0-1
|
|
|
|
|
|
- Init and adapt safwk to openEuler
|