summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--cmake/cpack.cmake8
-rw-r--r--contrib/accel-ppp.service (renamed from contrib/debian/accel-ppp.service)0
-rw-r--r--contrib/centos/centos.cmake24
4 files changed, 34 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b0dbe83..7ae1c4d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,6 +87,8 @@ if (NOT BUILD_DRIVER_ONLY)
add_subdirectory(accel-pppd)
add_subdirectory(crypto)
add_subdirectory(accel-cmd)
+
+ install(DIRECTORY DESTINATION /var/log/accel-ppp)
endif (NOT BUILD_DRIVER_ONLY)
if (BUILD_PPTP_DRIVER)
diff --git a/cmake/cpack.cmake b/cmake/cpack.cmake
index 692fbf7c..412eadff 100644
--- a/cmake/cpack.cmake
+++ b/cmake/cpack.cmake
@@ -32,4 +32,12 @@ IF(CPACK_TYPE STREQUAL Debian8)
INCLUDE(${CMAKE_HOME_DIRECTORY}/cmake/debian/debian.cmake)
ENDIF(CPACK_TYPE STREQUAL Debian8)
+IF(CPACK_TYPE STREQUAL Centos7)
+ SET(CPACK_RPM_PACKAGE_LICENSE "GPL")
+ SET(CPACK_RPM_PACKAGE_URL "http://accel-ppp.org")
+ SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/sbin")
+ SET(CPACK_RPM_PACKAGE_REQUIRES "glibc >= 2.17, openssl-libs >= 1.0.2k, pcre >= 8.32")
+ INCLUDE(${CMAKE_HOME_DIRECTORY}/cmake/centos/centos.cmake)
+ENDIF()
+
INCLUDE(CPack)
diff --git a/contrib/debian/accel-ppp.service b/contrib/accel-ppp.service
index f25a66d5..f25a66d5 100644
--- a/contrib/debian/accel-ppp.service
+++ b/contrib/accel-ppp.service
diff --git a/contrib/centos/centos.cmake b/contrib/centos/centos.cmake
new file mode 100644
index 00000000..a0dcd279
--- /dev/null
+++ b/contrib/centos/centos.cmake
@@ -0,0 +1,24 @@
+SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
+SET(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME})
+
+if (BUILD_DRIVER_ONLY)
+ 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_RPM_PACKAGE_REQUIRES "")
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/drivers/ipoe/driver/ipoe.ko DESTINATION lib/modules/${CENTOS_KDIR}/extra)
+ endif (BUILD_IPOE_DRIVER)
+
+ if (BUILD_VLAN_MON_DRIVER)
+ SET(CPACK_PACKAGING_INSTALL_PREFIX "/")
+ SET(CPACK_PACKAGE_NAME "accel-ppp-vlan_mon-kmod")
+ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "accel-ppp vlan monitoring kernel module")
+ SET(CPACK_RPM_PACKAGE_REQUIRES "")
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/drivers/vlan_mon/driver/vlan_mon.ko DESTINATION lib/modules/${CENTOS_KDIR}/extra)
+ endif (BUILD_VLAN_MON_DRIVER)
+else (BUILD_DRIVER_ONLY)
+ INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/contrib/accel-ppp.service DESTINATION /usr/lib/systemd/system)
+ INSTALL(FILES ${CMAKE_HOME_DIRECTORY}/accel-pppd/accel-ppp.conf DESTINATION /etc RENAME accel-ppp.conf.dist)
+endif (BUILD_DRIVER_ONLY)
+