diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-10-15 22:12:28 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-10-17 19:19:45 +0400 |
commit | ab92d89ca62f3a9e63ae4f8731efcdbd1d0a7202 (patch) | |
tree | d0071d27489056e4beea5e289e28d1d57dc516f1 /cmake/debian | |
parent | d32cf13525153b9bb961a72cded215e9866e78bd (diff) | |
download | accel-ppp-ab92d89ca62f3a9e63ae4f8731efcdbd1d0a7202.tar.gz accel-ppp-ab92d89ca62f3a9e63ae4f8731efcdbd1d0a7202.zip |
added cpack interface to generate deb packages
Diffstat (limited to 'cmake/debian')
-rw-r--r-- | cmake/debian/debian.cmake | 17 | ||||
-rwxr-xr-x | cmake/debian/postinst | 11 | ||||
-rwxr-xr-x | cmake/debian/preinst | 7 |
3 files changed, 35 insertions, 0 deletions
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 |