Commit 5d6cae1a authored by Naumann, Andreas's avatar Naumann, Andreas

directory creation for debs

parent 5fbf3bc6
......@@ -263,27 +263,39 @@ if(ENABLE_MARMOT)
Message("please set marmotcc manually")
endif(ENABLE_MARMOT)
set(deb_add_dirs "lib/amdis")
install(TARGETS amdis compositeFEM
LIBRARY DESTINATION lib/amdis/ )
FILE(GLOB HEADERS "${SOURCE_DIR}/*.h")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/)
list(APPEND deb_add_dirs "include/amdis")
FILE(GLOB HEADERS "${SOURCE_DIR}/*.hh")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/)
FILE(GLOB HEADERS "${SOURCE_DIR}/parallel/*.h")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/parallel/)
list(APPEND deb_add_dirs "include/amdis/parallel")
FILE(GLOB HEADERS "${SOURCE_DIR}/time/*.h")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/time/)
list(APPEND deb_add_dirs "include/amdis/time")
FILE(GLOB HEADERS "${SOURCE_DIR}/itl/*.hpp")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/itl)
list(APPEND deb_add_dirs "include/amdis/itl")
FILE(GLOB HEADERS "${SOURCE_DIR}/io/*.h")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/io)
list(APPEND deb_add_dirs "include/amdis/io")
FILE(GLOB HEADERS "${SOURCE_DIR}/io/*.hh")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/io)
......@@ -294,6 +306,8 @@ configure_file(${AMDiS_SOURCE_DIR}/AMDiSConfig.cmake.in
)
INSTALL(FILES ${AMDiS_BINARY_DIR}/AMDiSConfig.cmake
DESTINATION share/amdis/)
list(APPEND deb_add_dirs "share/amdis/")
INSTALL(FILES ${AMDiS_SOURCE_DIR}/AMDiSUse.cmake
DESTINATION share/amdis/)
......@@ -306,6 +320,14 @@ INSTALL(DIRECTORY ${AMDiS_SOURCE_DIR}/lib/mtl4/
PATTERN "mtl4/libs" EXCLUDE
PATTERN "mtl4/extern" EXCLUDE
)
FILE(GLOB_RECURSE mtl4_files
RELATIVE ${AMDiS_SOURCE_DIR}/lib/mtl4/boost/
${AMDiS_SOURCE_DIR}/lib/mtl4/boost/*.hpp)
foreach(mtl4_file in ${mtl4_files})
get_filename_component(mtl4File_path ${mtl4_file} PATH)
list(APPEND deb_add_dirs "include/amdis/mtl4/${mtl4File_path}")
endforeach(mtl4_file)
list(REMOVE_DUPLICATES deb_add_dirs)
#PACKAGES
#let cmake look for the svn-version
......@@ -323,8 +345,17 @@ set(CPACK_PACKAGE_VERSION "0.9.${CurrentRevision}")
set(CPACK_GENERATOR "RPM" "DEB" "TGZ")
set(CPACK_INSTALL_PREFIX "/usr/")
configure_file(${AMDiS_SOURCE_DIR}/preinst.in
${AMDiS_BINARY_DIR}/preinst
@ONLY)
configure_file(${AMDiS_SOURCE_DIR}/postrm.in
${AMDiS_BINARY_DIR}/postrm
@ONLY)
set(CPACK_RPM_PACKAGE_REQUIRES "boost-devel >= 1.42, ${RPM_DEPEND_STR}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-dev (>= 1.42)")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${AMDiS_BINARY_DIR}/preinst" "${AMDiS_BINARY_DIR}/postrm")
include(CPack)
if(ENABLE_TESTS)
ENABLE_TESTING()
......
#!/bin/sh
NEWDIRS_SEMI="@deb_add_dirs@"
NEWDIRS=`echo ${NEWDIRS_SEMI} | sed 's/;/ /g'`
BASEDIR=@CPACK_INSTALL_PREFIX@
#echo "will create the remove directories:"
for d in ${NEWDIRS}; do
# echo "${BASEDIR}${d}"
rm -rf ${BASEDIR}${d}
done
This diff is collapsed.
#!/bin/sh
NEWDIRS_SEMI="@deb_add_dirs@"
NEWDIRS=`echo ${NEWDIRS_SEMI} | sed 's/;/ /g'`
BASEDIR=@CPACK_INSTALL_PREFIX@
#echo "will create the following directories:"
for d in ${NEWDIRS}; do
# echo "${BASEDIR}${d}"
mkdir --parents ${BASEDIR}${d}
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment