diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/cpack.cmake | 26 | ||||
-rwxr-xr-x | cmake/debian-kmod/postinst | 3 | ||||
-rw-r--r-- | cmake/debian.cmake | 5 | ||||
-rw-r--r-- | cmake/debian/debian.cmake | 17 | ||||
-rwxr-xr-x | cmake/debian/postinst | 11 | ||||
-rwxr-xr-x | cmake/debian/preinst | 7 |
6 files changed, 69 insertions, 0 deletions
diff --git a/cmake/cpack.cmake b/cmake/cpack.cmake new file mode 100644 index 0000000..32845b4 --- /dev/null +++ b/cmake/cpack.cmake @@ -0,0 +1,26 @@ +INCLUDE(InstallRequiredSystemLibraries) + +SET(CPACK_PACKAGE_VERSION_MAJOR "1") +SET(CPACK_PACKAGE_VERSION_MINOR "1") +SET(CPACK_PACKAGE_VERSION_PATCH "2") + +SET(CPACK_PACKAGE_NAME "accel-pptp") +#SET(CPACK_PACKAGE_VERSION "1.1.2") +SET(CPACK_PACKAGE_CONTACT "Dmitry Kozlov <xeb@mail.ru>") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "High-performance multi-protocol tunneling server for Linux") + + + +SET(CPACK_PACKAGE_VENDOR "Dmitry Kozlov") +SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") +SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") +#SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") +#SET(CPACK_STRIP_FILES "usr/sbin/accel-pptpd") +#SET(CPACK_PACKAGE_EXECUTABLES "usr/sbin/accel-ppptp") + +IF(CMAKE_BUILD_TYPE STREQUAL Debian) + INCLUDE(${CMAKE_HOME_DIRECTORY}/cmake/debian/debian.cmake) +ENDIF(CMAKE_BUILD_TYPE STREQUAL Debian) + +INCLUDE(CPack) + diff --git a/cmake/debian-kmod/postinst b/cmake/debian-kmod/postinst new file mode 100755 index 0000000..9e7cfa8 --- /dev/null +++ b/cmake/debian-kmod/postinst @@ -0,0 +1,3 @@ +#!/bin/sh + +depmod diff --git a/cmake/debian.cmake b/cmake/debian.cmake new file mode 100644 index 0000000..2ff7b43 --- /dev/null +++ b/cmake/debian.cmake @@ -0,0 +1,5 @@ +SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE $ARCH) +SET(CPACK_DEBIAN_PACKAGE_DEPENDS libc6 libssl) +SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/postinst;${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/preinst") + + diff --git a/cmake/debian/debian.cmake b/cmake/debian/debian.cmake new file mode 100644 index 0000000..5aa8502 --- /dev/null +++ b/cmake/debian/debian.cmake @@ -0,0 +1,17 @@ +SET(CPACK_PACKAGING_INSTALL_PREFIX "/") +SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${ARCH}) + +if (BUILD_DRIVER_ONLY) + SET(CPACK_PACKAGE_NAME "accel-pptp-kmod") + SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "accel-pptp kernel module") + SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian-kmod/postinst") + 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)") + SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/preinst;${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/postinst") + + INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/contrib/debian/accel-pptp-init DESTINATION etc/init.d RENAME accel-pptp) + INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/contrib/debian/accel-pptp-default DESTINATION etc/default RENAME accel-pptp) +endif (BUILD_DRIVER_ONLY) + diff --git a/cmake/debian/postinst b/cmake/debian/postinst new file mode 100755 index 0000000..c85dc84 --- /dev/null +++ b/cmake/debian/postinst @@ -0,0 +1,11 @@ +#!/bin/sh + +chmod +x /etc/init.d/accel-pptp + +mkdir /var/log/accel-pptp &> /dev/null + +if [ -f /tmp/__accel-pptp.conf ]; then + mv /tmp/__accel-pptp.conf /etc/accel-pptp.conf +fi + +exit 0 diff --git a/cmake/debian/preinst b/cmake/debian/preinst new file mode 100755 index 0000000..765a4da --- /dev/null +++ b/cmake/debian/preinst @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ -f /etc/accel-pptp.conf ]; then + mv /etc/accel-pptp.conf /tmp/__accel-pptp.conf +fi + +exit 0 |