1 Star 0 Fork 7

tianhang/distributed-beget

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
distributed-beget.spec 5.53 KB
一键复制 编辑 原始数据 按行查看 历史
tianhang 提交于 2024-05-07 09:15 . update distributed-beget.spec.
%define debug_package %{nil}
%global build_opt /opt/distributed-middleware-build
%global init_path %{build_opt}/openeuler/compiler_gn/base/startup/init
%global openHarmony_source_release OpenHarmony-v3.2-Release
Name: distributed-beget
Version: 1.0.0
Release: 7
Summary: openEuler embedded softbus capability support
License: Apache License 2.0
URL: https://gitee.com/openeuler/distributed-beget.git
Source1: distributed-beget.tar.gz
Source2: startup.bundle.json
Source3: startup.BUILD.gn
Patch1: 0001-fixbug_fd_leak_for_init.patch
Patch2: 0002-feat-for-embedded-fix-compile-errors.patch
Patch3: 0003-feat-for-embedded-fix-sysroot-hilog-path.patch
Patch4: 0004-refactor-using-the-reactor-framework.patch
Patch5: 0005-feat-for-embedded-fix-compile-errors-after-refactor.patch
Patch6: 0006-feat-auto-generated-udid-and-add-new-interfaces.patch
Patch7: 0007-modify-default-param-read-path.patch
BuildRequires: distributed-build, hilog, commonlibrary_c_utils,compat-openssl11-devel
Requires: commonlibrary_c_utils
Requires: hilog
# Requires: libatomic
%description
OpenEuler supports param service for distributed softbus capability
%prep
# Create directory structure
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}
# mkdir -p %{_builddir}/base/startup
%setup -q -D -T -a 1 -c -n %{_builddir}/base/startup
%patch -P1 -p1 -d %{_builddir}/base/startup/init
%patch -P2 -p1 -d %{_builddir}/base/startup/init
%patch -P3 -p1 -d %{_builddir}/base/startup/init
%patch -P4 -p1 -d %{_builddir}/base/startup/init
%patch -P5 -p1 -d %{_builddir}/base/startup/init
%patch -P6 -p1 -d %{_builddir}/base/startup/init
%patch -P7 -p1 -d %{_builddir}/base/startup/init
# exit 0
%build
%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}/init/syspara
install -d -m 0755 %{buildroot}/%{_includedir}/init/param
install -d -m 0755 %{buildroot}/%{_libdir}
install -d -m 0755 %{buildroot}/system/lib64/
install -d -m 0755 %{buildroot}/%{_bindir}
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/base/startup/init/interfaces/innerkits
install -d -m 0755 %{buildroot}/%{_sysconfdir}/param
%ifarch aarch64
%define module_out_path out/openeuler/linux_clang_arm64
%define so_out_path out/openeuler/linux_clang_arm64/startup/init/
%endif
%ifarch x86_64
%define module_out_path out/openeuler/linux_clang_x86_64
%define so_out_path out/openeuler/linux_clang_x86_64/startup/init/
%endif
# bin
install -m 0755 %{_builddir}/out/openeuler/packages/phone/system/bin/param_service %{buildroot}/%{_bindir}
# shared library
install -m 0755 %{_builddir}/%{so_out_path}/libbeget_proxy.z.so %{buildroot}/%{_libdir}
install -m 0755 %{_builddir}/%{so_out_path}/libbegetutil.z.so %{buildroot}/%{_libdir}
install -m 0755 %{_builddir}/%{so_out_path}/libbeget_proxy.z.so %{buildroot}/system/lib64/
install -m 0755 %{_builddir}/%{so_out_path}/libbegetutil.z.so %{buildroot}/system/lib64/
# header files
%define interface_path base/startup/init/interfaces/innerkits/include
%define service_path base/startup/init/services/include
install -m 0755 %{_builddir}/%{interface_path}/{beget_ext.h,service_watcher.h,service_control.h} %{buildroot}/%{_includedir}/init
install -m 0755 %{_builddir}/%{interface_path}/syspara/* %{buildroot}/%{_includedir}/init/syspara
install -m 0755 %{_builddir}/%{interface_path}/syspara/* %{buildroot}/%{_includedir}/init
install -m 0755 %{_builddir}/%{service_path}/init_utils.h %{buildroot}/%{_includedir}/init
install -m 0755 %{_builddir}/%{service_path}/param/* %{buildroot}/%{_includedir}/init/param
install -m 0755 %{_builddir}/%{service_path}/param/* %{buildroot}/%{_includedir}/init
# default param file
install -m 0755 %{_builddir}/out/openeuler/packages/phone/system/etc/param/* %{buildroot}/%{_sysconfdir}/param
# cp bundle.json
mkdir -p %{buildroot}%{init_path}
mkdir -p %{buildroot}%{init_path}/interfaces/innerkits/
install -m 0755 %{SOURCE2} %{buildroot}%{init_path}/bundle.json
# cp BUILD.gn
install -m 0755 %{SOURCE3} %{buildroot}%{init_path}/interfaces/innerkits/BUILD.gn
# create soft link
ln -s /usr/include/init %{buildroot}%{build_opt}/openeuler/compiler_gn/%{interface_path}
%files
%{_bindir}/*
%{_libdir}/*
%{_includedir}/init/*
/system/lib64/*
%{build_opt}/*
%{_sysconfdir}/*
%changelog
* Tue May 7 2024 peng_langyuan <peng_langyuan@hoperun.com> - 1.0.0-7
- Apply the 6th and 7th patch
* Wed Apr 24 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-6
- Apply the 5th patch
* Mon Apr 8 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-5
- Fix compile errors and BUILD.gn for embedded after refactor
* Wed Mar 27 2024 peng_langyuan <peng_langyuan@hoperun.com> - 1.0.0-4
- Refactor param service using the reactor framework
* Mon Mar 18 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-3
- Fix compile errors and sysroot hilog path for embedded
* Thu Mar 14 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-2
- Remove unused tar.gz
* Fri Nov 24 2023 muyuying <muyuying1@huawei.com> - 1.0.0-1
- Init and Adapt to Openeule
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tian2020/distributed-beget.git
git@gitee.com:tian2020/distributed-beget.git
tian2020
distributed-beget
distributed-beget
master

搜索帮助