diff --git a/communication_ipc.spec b/communication_ipc.spec index 52ee5b3c0e05ea3db14e4a1312f8306607adb003..e5af0b7cf96c590316aed57c8c45a34f0292d7f6 100644 --- a/communication_ipc.spec +++ b/communication_ipc.spec @@ -7,6 +7,9 @@ %global binder_dest_path /usr/lib/modules/%(uname -r)/binder %global ashmem_dest_path /usr/lib/modules/%(uname -r)/ashmem +%define with_ashmem 0 +%define with_install_ko 0 + Name: communication_ipc Version: 1.0.0 Release: 1%{?dist} @@ -82,6 +85,9 @@ mv %{third_party_path}/third_party_mbedtls-%{oh_version} %{third_party_path}/mbe %setup -q -D -T -a 6 -c -n %{_builddir} %patch -P3 -p1 -d %{_builddir}/binder +%setup -q -D -T -a 16 -c -n %{_builddir} + + %build %ifarch x86_64 @@ -96,8 +102,10 @@ mv %{third_party_path}/third_party_mbedtls-%{oh_version} %{third_party_path}/mbe cd %{_builddir}/binder make %{?_smp_mflags} +%if 0%{?with_ashmem} cd %{_builddir}/ashmem/src make %{?_smp_mflags} +%endif %install install -d -m 0755 %{buildroot}/%{_includedir}/ipc @@ -173,9 +181,11 @@ install -m 0755 %{SOURCE15} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foun install -d %{buildroot}/%{binder_dest_path}/ install -d %{buildroot}/%{ashmem_dest_path}/ install -m 0755 %{_builddir}/binder/binder_linux.ko %{buildroot}/%{binder_dest_path}/ +%if 0%{?with_ashmem} install -m 0755 %{_builddir}/ashmem/src/ashmem_linux.ko %{buildroot}/%{ashmem_dest_path}/ +%endif mkdir -p %{buildroot}/usr/share/pp -cp -pdf %{_builddir}/binder.pp %{buildroot}/usr/share/pp +install -m 0755 %{SOURCE17} %{buildroot}/usr/share/pp/binder.pp #create soft link ln -s /usr/mbedtls/include %{buildroot}%{build_opt}/openeuler/compiler_gn/third_party/mbedtls/include @@ -197,13 +207,22 @@ ln -s /usr/include/dsoftbus %{buildroot}%{build_opt}/openeuler/compiler_gn/found %{_includedir}/dsoftbus/* /system/* /%{binder_dest_path}/*.ko +%if 0%{?with_ashmem} /%{ashmem_dest_path}/*.ko +%endif %{build_opt}/* /usr/share/pp %post semodule -X 300 -i /usr/share/pp/binder.pp +%if 0%{?with_install_ko} +insmod /%{binder_dest_path}/*.ko +%if 0%{?with_ashmem} +insmod /%{ashmem_dest_path}/*.ko +%endif +%endif + %changelog * Sun Oct 08 2023 Peng He - 1.0.0-1 * Thu Nov 22 2023 JiaQi Zhao - 1.0.0-1