diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-01-18 20:21:48 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-01-18 20:21:48 +0300 |
commit | 2742af0f2760b7b8d326aa4112aac14b453e3bbb (patch) | |
tree | ad49eb62da5a5521a18200449c4a9c24277ef657 | |
parent | f350fd852cd4870c72736cba154153cfad4ceea9 (diff) | |
download | accel-ppp-2742af0f2760b7b8d326aa4112aac14b453e3bbb.tar.gz accel-ppp-2742af0f2760b7b8d326aa4112aac14b453e3bbb.zip |
updated build system
-rw-r--r-- | accel-pppd/CMakeLists.txt | 11 | ||||
-rw-r--r-- | cmake/cpack.cmake | 6 | ||||
-rw-r--r-- | cmake/debian/debian.cmake | 5 | ||||
-rw-r--r-- | driver/CMakeLists.txt | 5 |
4 files changed, 20 insertions, 7 deletions
diff --git a/accel-pppd/CMakeLists.txt b/accel-pppd/CMakeLists.txt index b3c8dad..526ad89 100644 --- a/accel-pppd/CMakeLists.txt +++ b/accel-pppd/CMakeLists.txt @@ -96,10 +96,13 @@ INSTALL(TARGETS accel-pppd RUNTIME DESTINATION sbin ) -INSTALL(FILES accel-ppp.conf DESTINATION /etc RENAME accel-ppp.conf.dist) INSTALL(FILES accel-ppp.conf.5 DESTINATION share/man/man5) -INSTALL(CODE "EXECUTE_PROCESS(COMMAND mkdir -p /var/log/accel-ppp)") -INSTALL(CODE "EXECUTE_PROCESS(COMMAND mkdir -p /var/run/accel-ppp)") -INSTALL(CODE "EXECUTE_PROCESS(COMMAND 'echo 0 > /var/run/accel-ppp/seq')") +IF (NOT DEFINED CPACK_TYPE) + INSTALL(FILES accel-ppp.conf DESTINATION /etc RENAME accel-ppp.conf.dist) + + INSTALL(CODE "EXECUTE_PROCESS(COMMAND mkdir -p /var/log/accel-ppp)") + INSTALL(CODE "EXECUTE_PROCESS(COMMAND mkdir -p /var/run/accel-ppp)") + INSTALL(CODE "EXECUTE_PROCESS(COMMAND 'echo 0 > /var/run/accel-ppp/seq')") +ENDIF (NOT DEFINED CPACK_TYPE) diff --git a/cmake/cpack.cmake b/cmake/cpack.cmake index 950c6f5..3de94d7 100644 --- a/cmake/cpack.cmake +++ b/cmake/cpack.cmake @@ -13,7 +13,13 @@ SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") IF(CPACK_TYPE STREQUAL Debian) + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.7), libssl0.9.8 (>= 0.9.8), libpcre3 (>= 7.6)") INCLUDE(${CMAKE_HOME_DIRECTORY}/cmake/debian/debian.cmake) ENDIF(CPACK_TYPE STREQUAL Debian) +IF(CPACK_TYPE STREQUAL Ubuntu) + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.12.1), libssl0.9.8 (>= 0.9.8), libpcre3 (>= 8.02), libnl2 (>= 1.99)") + INCLUDE(${CMAKE_HOME_DIRECTORY}/cmake/debian/debian.cmake) +ENDIF(CPACK_TYPE STREQUAL Ubuntu) + INCLUDE(CPack) diff --git a/cmake/debian/debian.cmake b/cmake/debian/debian.cmake index 3de8b73..b7bd029 100644 --- a/cmake/debian/debian.cmake +++ b/cmake/debian/debian.cmake @@ -8,11 +8,14 @@ if (BUILD_DRIVER_ONLY) SET(CPACK_PACKAGING_INSTALL_PREFIX "/") SET(CPACK_PACKAGE_NAME "accel-pptp-kmod") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "accel-pptp kernel module") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "") SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian-kmod/postinst") + INSTALL(DIRECTORY lib/modules/${DEBIAN_KDIR}/extra) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/driver/driver/pptp.ko DESTINATION lib/modules/${DEBIAN_KDIR}/extra) #SET(CPACK_DEBIAN_PACKAGE_DEPENDS "linux-image (= ${LINUX_IMAGE})") else (BUILD_DRIVER_ONLY) - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.7), libssl0.9.8 (>= 0.9.8), libpcre3 (>= 7.6)") + #SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.7), libssl0.9.8 (>= 0.9.8), libpcre3 (>= 7.6)") + SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/postinst;${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/conffiles") INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/accel-pppd/accel-ppp.conf DESTINATION ${CMAKE_BINARY_DIR}/_CPack_Packages/Linux/DEB/${CPACK_PACKAGE_FILE_NAME}/etc RENAME accel-ppp.conf.dist) diff --git a/driver/CMakeLists.txt b/driver/CMakeLists.txt index 1daeb08..fd732e6 100644 --- a/driver/CMakeLists.txt +++ b/driver/CMakeLists.txt @@ -14,5 +14,6 @@ ADD_CUSTOM_TARGET(pptp_drv ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/driver/pptp.ko ) -INSTALL(CODE "EXECUTE_PROCESS(COMMAND make -C ${KDIR} M=${CMAKE_CURRENT_BINARY_DIR}/driver modules_install)") - +IF (NOT DEFINED CPACK_TYPE) + INSTALL(CODE "EXECUTE_PROCESS(COMMAND make -C ${KDIR} M=${CMAKE_CURRENT_BINARY_DIR}/driver modules_install)") +ENDIF (NOT DEFINED CPACK_TYPE) |