diff options
-rw-r--r-- | CMakeLists.txt | 24 | ||||
-rw-r--r-- | cmake/cpack.cmake | 7 | ||||
-rw-r--r-- | cmake/debian/debian.cmake | 42 | ||||
-rw-r--r-- | drivers/ipoe/ipoe.c | 2 |
4 files changed, 46 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d52511f..c41f0e02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ IF (NOT DEFINED LIB_SUFFIX) ENDIF (ARCH STREQUAL x86_64) ENDIF (NOT DEFINED LIB_SUFFIX) -IF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT DEFINED IGNORE_GIT) +IF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT IGNORE_GIT) EXECUTE_PROCESS( COMMAND git log --no-color COMMAND head -n1 @@ -29,9 +29,9 @@ IF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT DEFINED IGNORE_GIT) OUTPUT_VARIABLE ACCEL_PPP_VERSION ) STRING(STRIP ${ACCEL_PPP_VERSION} ACCEL_PPP_VERSION) -ELSE (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT DEFINED IGNORE_GIT) - SET (ACCEL_PPP_VERSION 1.8.0-beta) -ENDIF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT DEFINED IGNORE_GIT) +ELSE (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT IGNORE_GIT) + SET (ACCEL_PPP_VERSION 1.8.0) +ENDIF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT IGNORE_GIT) ADD_DEFINITIONS(-DACCEL_PPP_VERSION="${ACCEL_PPP_VERSION}") INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) @@ -64,13 +64,17 @@ if (NOT BUILD_DRIVER_ONLY) add_subdirectory(accel-cmd) endif (NOT BUILD_DRIVER_ONLY) -if (BUILD_DRIVER OR BUILD_DRIVER_ONLY) - add_subdirectory(drivers/pptp) -endif (BUILD_DRIVER OR BUILD_DRIVER_ONLY) +if (BUILD_PPTP_DRIVER OR BUILD_DRIVER_ONLY) + if (BUILD_PPTP_DRIVER) + add_subdirectory(drivers/pptp) + endif (BUILD_PPTP_DRIVER) +endif (BUILD_PPTP_DRIVER OR BUILD_DRIVER_ONLY) -if (BUILD_IPOE_DRIVER) - add_subdirectory(drivers/ipoe) -endif (BUILD_IPOE_DRIVER) +if (BUILD_IPOE_DRIVER OR BUILD_DRIVER_ONLY) + if (BUILD_IPOE_DRIVER) + add_subdirectory(drivers/ipoe) + endif (BUILD_IPOE_DRIVER) +endif (BUILD_IPOE_DRIVER OR BUILD_DRIVER_ONLY) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) diff --git a/cmake/cpack.cmake b/cmake/cpack.cmake index fa5ce3c6..b36bf599 100644 --- a/cmake/cpack.cmake +++ b/cmake/cpack.cmake @@ -1,7 +1,7 @@ INCLUDE(InstallRequiredSystemLibraries) SET(CPACK_PACKAGE_VERSION_MAJOR "1") -SET(CPACK_PACKAGE_VERSION_MINOR "7") +SET(CPACK_PACKAGE_VERSION_MINOR "8") SET(CPACK_PACKAGE_VERSION_PATCH "0") SET(CPACK_PACKAGE_NAME "accel-ppp") @@ -22,4 +22,9 @@ IF(CPACK_TYPE STREQUAL Debian6) INCLUDE(${CMAKE_HOME_DIRECTORY}/cmake/debian/debian.cmake) ENDIF(CPACK_TYPE STREQUAL Debian6) +IF(CPACK_TYPE STREQUAL Debian7) + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.13), libssl1.0.0 (>= 1.0.0), libpcre3 (>= 8.30)") + INCLUDE(${CMAKE_HOME_DIRECTORY}/cmake/debian/debian.cmake) +ENDIF(CPACK_TYPE STREQUAL Debian7) + INCLUDE(CPack) diff --git a/cmake/debian/debian.cmake b/cmake/debian/debian.cmake index 0fcc2d55..5ba44c88 100644 --- a/cmake/debian/debian.cmake +++ b/cmake/debian/debian.cmake @@ -2,24 +2,32 @@ SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr") SET(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}) if (BUILD_DRIVER_ONLY) - SET(CPACK_PACKAGE_VERSION_MAJOR "0") - SET(CPACK_PACKAGE_VERSION_MINOR "8") - SET(CPACK_PACKAGE_VERSION_PATCH "5") - 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)") + if (BUILD_PPTP_DRIVER) + SET(CPACK_PACKAGE_VERSION_MAJOR "0") + SET(CPACK_PACKAGE_VERSION_MINOR "8") + SET(CPACK_PACKAGE_VERSION_PATCH "5") + 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})") + endif (BUILD_PPTP_DRIVER) + if (BUILD_IPOE_DRIVER) + SET(CPACK_PACKAGING_INSTALL_PREFIX "/") + SET(CPACK_PACKAGE_NAME "accel-ppp-ipoe-kmod") + SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "accel-ppp IPoE kernel module") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "") + SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian-kmod/postinst") + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/drivers/ipoe/driver/ipoe.ko DESTINATION lib/modules/${DEBIAN_KDIR}/extra) + endif (BUILD_IPOE_DRIVER) +else (BUILD_DRIVER_ONLY) 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) - INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/contrib/debian/accel-ppp-init DESTINATION ${CMAKE_BINARY_DIR}/_CPack_Packages/Linux/DEB/${CPACK_PACKAGE_FILE_NAME}/etc/init.d RENAME accel-ppp) - INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/contrib/debian/accel-ppp-default DESTINATION ${CMAKE_BINARY_DIR}/_CPack_Packages/Linux/DEB/${CPACK_PACKAGE_FILE_NAME}/etc/default RENAME accel-ppp) - + INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/accel-pppd/accel-ppp.conf DESTINATION /etc RENAME accel-ppp.conf.dist) + INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/contrib/debian/accel-ppp-init DESTINATION /etc/init.d RENAME accel-ppp) + INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/contrib/debian/accel-ppp-default DESTINATION /etc/default RENAME accel-ppp) endif (BUILD_DRIVER_ONLY) diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index c7b4b9ce..4a1a798b 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -1902,7 +1902,7 @@ static int __init ipoe_init(void) { int err, i; - printk("IPoE session driver v0.2\n"); + printk("IPoE session driver v1.8.0\n"); /*err = register_pernet_device(&ipoe_net_ops); if (err < 0) |