代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/distributedhardware_device_manager 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%define debug_package %{nil}
%global openHarmony_source_release OpenHarmony-v3.2-Release
%global device_manager_dir %{_builddir}/foundation/distributedhardware
%global build_opt /opt/distributed-middleware-build
Name: device_manager
Version: 1.0.0
Release: 1
Summary: OpenEuler supports device manager for distributed softbus capability
License: Apache License 2.0
Url: https://gitee.com/openharmony/distributedhardware_device_manager
Source0: https://gitee.com/openharmony/distributedhardware_device_manager/repository/archive/%{openHarmony_source_release}.tar.gz #/distributedhardware_device_manager-%{openHarmony_source_release}.tar.gz
Patch0000: 0001-init-and-adapt-to-openeuler.patch
BuildRequires: distributed-build, libboundscheck
#dsoftbus, c_utils, samgr, huks, device_auth, ipc, hilog
Requires: libboundscheck, dsoftbus
%description
OpenEuler supports device manager for distributed softbus capability
%prep
#clean %{_builddir}
rm -rf %{_builddir}/*
%autosetup -p1 -n distributedhardware_device_manager-%{openHarmony_source_release}
cd %{_builddir}
mkdir -p %{device_manager_dir}
mv distributedhardware_device_manager-%{openHarmony_source_release} %{device_manager_dir}/device_manager
# build directory
cp -rp %{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 -r %{_builddir}/build/openeuler/vendor %{_builddir}/
cp -r %{_builddir}/build/openeuler/compiler_gn/third_party %{_builddir}/
# copy depends components GN from build/openeuler/compiler_gn
mkdir -p %{_builddir}/base/startup
mkdir -p %{_builddir}/base/hiviewdfx
mkdir -p %{_builddir}/base/security
mkdir -p %{_builddir}/base/notification/
mkdir -p %{_builddir}/foundation/systemabilitymgr
mkdir -p %{_builddir}/foundation/communication
cp -rf %{_builddir}/build/openeuler/compiler_gn/commonlibrary %{_builddir}
cp -rf %{_builddir}/build/openeuler/compiler_gn/base/startup %{_builddir}/base
cp -rf %{_builddir}/build/openeuler/compiler_gn/base/hiviewdfx/hilog %{_builddir}/base/hiviewdfx
cp -rf %{_builddir}/build/openeuler/compiler_gn/base/hiviewdfx/hitrace %{_builddir}/base/hiviewdfx
cp -rf %{_builddir}/build/openeuler/compiler_gn/foundation/systemabilitymgr/samgr %{_builddir}/foundation/systemabilitymgr
cp -rf %{_builddir}/build/openeuler/compiler_gn/foundation/systemabilitymgr/safwk %{_builddir}/foundation/systemabilitymgr
cp -rf %{_builddir}/build/openeuler/compiler_gn/foundation/communication/ipc %{_builddir}/foundation/communication
cp -rf %{_builddir}/build/openeuler/compiler_gn/foundation/communication/dsoftbus %{_builddir}/foundation/communication
cp -rf %{_builddir}/build/openeuler/compiler_gn/base/security/huks %{_builddir}/base/security
cp -rf %{_builddir}/build/openeuler/compiler_gn/base/security/device_auth %{_builddir}/base/security
cp -rf %{_builddir}/build/openeuler/compiler_gn/base/notification/eventhandler %{_builddir}/base/notification/
#directory to avoid %build fail
mkdir distributedhardware_device_manager-%{openHarmony_source_release}
%build
cd %{_builddir}
rm -rf %{_builddir}/out
%ifarch x86_64
./build.sh --product-name openeuler --target-cpu x86_64
%endif
%ifarch aarch64
./build.sh --product-name openeuler --target-cpu arm64
%endif
%install
#include files
install -d %{buildroot}/%{_includedir}/device_manager
install -d %{buildroot}/%{_includedir}/device_manager/ipc
install -d %{buildroot}/%{_includedir}/device_manager/ipc/lite
install -d %{buildroot}/%{_includedir}/device_manager/ipc/standard
install -d %{buildroot}/%{_includedir}/device_manager/notify
install -d %{buildroot}/%{_includedir}/device_manager/common
install -d %{buildroot}/%{_includedir}/device_manager/common/ipc
install -d %{buildroot}/%{_includedir}/device_manager/common/ipc/model
install -d %{buildroot}/%{_includedir}/device_manager/common/ips/standard
install -d %{buildroot}/%{_includedir}/device_manager/common/dfx
install -d %{buildroot}/%{_includedir}/device_manager/common/dfx/standard
#sa file
install -d %{buildroot}/system/profile
#lib file
install -d %{buildroot}/%{_libdir}
# prepare so
install -m 0755 %{_builddir}/out/openeuler/packages/phone/system/lib64/libdevicemanager*.so %{buildroot}/%{_libdir}
# prepare head files according to bundle.json
install -m 554 %{device_manager_dir}/device_manager/interfaces/inner_kits/native_cpp/include/*.h %{buildroot}/%{_includedir}/device_manager
install -m 554 %{device_manager_dir}/device_manager/interfaces/inner_kits/native_cpp/include/ipc/*.h %{buildroot}/%{_includedir}/device_manager/ipc
install -m 554 %{device_manager_dir}/device_manager/interfaces/inner_kits/native_cpp/include/ipc/lite/*.h %{buildroot}/%{_includedir}/device_manager/ipc/lite
install -m 554 %{device_manager_dir}/device_manager/interfaces/inner_kits/native_cpp/include/ipc/standard/*.h %{buildroot}/%{_includedir}/device_manager/ipc/standard
install -m 554 %{device_manager_dir}/device_manager/interfaces/inner_kits/native_cpp/include/notify/*.h %{buildroot}/%{_includedir}/device_manager/notify
install -m 554 %{device_manager_dir}/device_manager/common/include/*.h %{buildroot}/%{_includedir}/device_manager/common
install -m 554 %{device_manager_dir}/device_manager/common/include/ipc/*.h %{buildroot}/%{_includedir}/device_manager/common/ipc
install -m 554 %{device_manager_dir}/device_manager/common/include/ipc/model/*.h %{buildroot}/%{_includedir}/device_manager/common/ipc/model
install -m 554 %{device_manager_dir}/device_manager/common/include/ipc/standard/*.h %{buildroot}/%{_includedir}/device_manager/common/ips/standard
install -m 554 %{device_manager_dir}/device_manager/common/include/dfx/*.h %{buildroot}/%{_includedir}/device_manager/common/dfx
install -m 554 %{device_manager_dir}/device_manager/common/include/dfx/standard/*.h %{buildroot}/%{_includedir}/device_manager/common/dfx/standard
#prepare sa file
install -m 0755 %{_builddir}/out/openeuler/packages/phone/sa_profile/merged_sa/device_manager.xml %{buildroot}/system/profile
%files
%{_includedir}/device_manager/*
%{_libdir}/*.so
/system/profile/*
%changelog
* Fri Jun 16 2023 tianhang <tian_hang@hoperun.com> - 1.0.0-1
- Init and adapt to openeuler
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。