1 Star 0 Fork 11

tianhang/distributedhardware_device_manager_2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
device_manager.spec 6.21 KB
一键复制 编辑 原始数据 按行查看 历史
tianhang 提交于 2023-06-16 14:20 . feat:init and adapt to openeuler
%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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tian2020/distributedhardware_device_manager_2.git
git@gitee.com:tian2020/distributedhardware_device_manager_2.git
tian2020
distributedhardware_device_manager_2
distributedhardware_device_manager_2
master

搜索帮助