Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 68e70613 authored by hhakim's avatar hhakim
Browse files

Add pkg postinst. script to symlink matio if needed on debian/ubuntu sys.

Also remove the last exit command of postinst_py.sh to avoid possible next script ignore (not sure but exit is useless anyway).
parent a2950f2c
No related branches found
No related tags found
No related merge requests found
...@@ -865,7 +865,8 @@ ELSE(WIN32 AND NOT UNIX) ...@@ -865,7 +865,8 @@ ELSE(WIN32 AND NOT UNIX)
file(READ ${PROJECT_BINARY_DIR}/postinst2 POSTINST2_LINES) file(READ ${PROJECT_BINARY_DIR}/postinst2 POSTINST2_LINES)
file(APPEND ${PROJECT_BINARY_DIR}/postinst "${POSTINST2_LINES}") file(APPEND ${PROJECT_BINARY_DIR}/postinst "${POSTINST2_LINES}")
file(REMOVE ${PROJECT_BINARY_DIR}/postinst2) file(REMOVE ${PROJECT_BINARY_DIR}/postinst2)
endif() endif()
#SET(CPACK_RPM_PACKAGE_DEPENDS "libmat, libmex, libmx ") #SET(CPACK_RPM_PACKAGE_DEPENDS "libmat, libmex, libmx ")
#CPACK_RPM_PACKAGE_GROUP #CPACK_RPM_PACKAGE_GROUP
#SET (CPACK_RPM_PACKAGE_REQUIRES ) #SET (CPACK_RPM_PACKAGE_REQUIRES )
...@@ -875,13 +876,17 @@ set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST "/opt") # to not conflict with filesyst ...@@ -875,13 +876,17 @@ set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST "/opt") # to not conflict with filesyst
if(NOT ${USE_MATIO_STATIC_LIBS}) if(NOT ${USE_MATIO_STATIC_LIBS})
set(CPACK_RPM_PACKAGE_REQUIRES "matio >= 1.5.7") set(CPACK_RPM_PACKAGE_REQUIRES "matio >= 1.5.7")
#set(CPACK_DEBIAN_PACKAGE_DEPENDS "matio") set(CPACK_DEBIAN_PACKAGE_DEPENDS "libmatio-dev (>= 1.5.7)")
# add postinst script to symlink matio lib if needed
file(READ ${PROJECT_SOURCE_DIR}/misc/binpkg_postinst_scripts/debrpm/postinst_matio_symlink.sh POSTINST2_LINES)
file(APPEND ${PROJECT_BINARY_DIR}/postinst "${POSTINST2_LINES}")
file(REMOVE ${PROJECT_BINARY_DIR}/postinst2)
endif() endif()
if(BUILD_WRAPPER_PYTHON) if(BUILD_WRAPPER_PYTHON)
#set(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, python3 >= 3.6.5, python3-numpy >= 1.13.3, python3-scipy >= 1.0.0") #set(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, python3 >= 3.6.5, python3-numpy >= 1.13.3, python3-scipy >= 1.0.0")
#set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, python3, python3-numpy, python3-scipy) #set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, python3, python3-numpy, python3-scipy)
endif() endif()
#TODO: for debian package also ? #no need to exclude library auto-deps for debian package/ubuntu
set(CPACK_RPM_SPEC_MORE_DEFINE "%define __requires_exclude ^libmex[.]so.*|libmat[.]so.*|libmx[.]so.*|libpython.*[.]so.*$ ") set(CPACK_RPM_SPEC_MORE_DEFINE "%define __requires_exclude ^libmex[.]so.*|libmat[.]so.*|libmx[.]so.*|libpython.*[.]so.*$ ")
set(CPACK_RPM_PACKAGE_RELEASE "1") set(CPACK_RPM_PACKAGE_RELEASE "1")
......
#!/bin/bash
# for debian and ubuntu packages libmatio-dev are only creating libmatio.so file
# but faust build relies on a symblink toward this lib which is named libmatio.so.4
# so create it!
which dpkg-query >/dev/null && LIBMATIO_SO_PATH=$(dpkg-query -L libmatio-dev 2>/dev/null | grep libmatio.so)
ln -sf $LIBMATIO_SO_PATH ${LIBMATIO_SO_PATH}.4
...@@ -45,5 +45,4 @@ do ...@@ -45,5 +45,4 @@ do
which python$V 2>&1 > /dev/null && link_py_files $V which python$V 2>&1 > /dev/null && link_py_files $V
done done
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment