diff --git a/independent_build.sh b/independent_build.sh index 51cf6268d..7bebf6f14 100755 --- a/independent_build.sh +++ b/independent_build.sh @@ -452,8 +452,10 @@ if [ "${MLUOP_PACKAGE_INFO_SET}" = "ON" ]; then mkdir -p ${PACKAGE_DIR} mkdir -p ${PACKAGE_DIR}/include mkdir -p ${PACKAGE_DIR}/lib64 + mkdir -p ${PACKAGE_DIR}/samples cp -rf ${BUILD_DIR}/lib/libmluops.so* ${PACKAGE_DIR}/lib64 + cp -r samples/* ${PACKAGE_DIR}/samples cp mlu_op.h ${PACKAGE_DIR}/include TEST_DIR="test_workspace/mluops" diff --git a/installer/centos7.5/SPECS/mluops-independent.spec b/installer/centos7.5/SPECS/mluops-independent.spec index 770135164..4e6160dee 100644 --- a/installer/centos7.5/SPECS/mluops-independent.spec +++ b/installer/centos7.5/SPECS/mluops-independent.spec @@ -1,7 +1,7 @@ %define __spec_install_post /usr/lib/rpm/brp-compress || : %define debug_package %{nil} %define neuware_dir /usr/local/neuware -%define build_dir build +%define build_dir package Name: mluops Summary: The Machine Lerning Unit OPerators @@ -47,13 +47,9 @@ The Machine Lerning Unit OPerators. bash independent_build.sh -t %{_packagetype} %install -install -d $RPM_BUILD_ROOT%{neuware_dir}/lib64 -install -d $RPM_BUILD_ROOT%{neuware_dir}/include +strip %{build_dir}%{neuware_dir}/lib64/libmluops.so* +cp -rf %{build_dir}/* $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT/etc/ld.so.conf.d -strip %{build_dir}/lib/libmluops.so* -cp %{build_dir}/lib/libmluops.so* $RPM_BUILD_ROOT%{neuware_dir}/lib64/ -cp mlu_op.h $RPM_BUILD_ROOT%{neuware_dir}/include/ -cp -r samples $RPM_BUILD_ROOT%{neuware_dir}/ cp $RPM_SOURCE_DIR/neuware-env.conf $RPM_BUILD_ROOT/etc/ld.so.conf.d/ %clean @@ -62,9 +58,7 @@ cp $RPM_SOURCE_DIR/neuware-env.conf $RPM_BUILD_ROOT/etc/ld.so.conf.d/ %files %defattr (-, root, root) -%{neuware_dir}/include/mlu_op.h -%{neuware_dir}/lib64/libmluops.so* -%{neuware_dir}/samples/mlu-ops +%{neuware_dir}/* /etc/ld.so.conf.d/neuware-env.conf %post -p /sbin/ldconfig