Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix](mlu-ops): Fix the softlink relation in rpm package r1.1. #992

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions independent_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 4 additions & 10 deletions installer/centos7.5/SPECS/mluops-independent.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading