-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fancy
committed
Apr 28, 2020
1 parent
836a34c
commit daa68f2
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
project(cgproxy VERSION 1.0) | ||
project(cgproxy VERSION 3.4) | ||
add_executable(cgattach cgattach.cpp) | ||
|
||
install(TARGETS cgattach DESTINATION /usr/bin | ||
|
@@ -21,3 +21,28 @@ install(FILES cgproxy.conf | |
DESTINATION /etc/) | ||
install(FILES cgroup-tproxy.sh | ||
DESTINATION /usr/share/cgproxy/scripts/) | ||
|
||
|
||
## deb pack | ||
set(CPACK_GENERATOR "DEB;RPM") | ||
set(CPACK_PACKAGE_NAME "cgproxy") | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "cgproxy will transparent proxy anything running in specific cgroup.It aslo supports global transparent proxy and gateway proxy") | ||
|
||
set(CPACK_DEBIAN_PACKAGE_NAME "cgproxy") | ||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "x86_64") | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "systemd") | ||
set(CPACK_DEBIAN_PACKAGE_SECTION "network") | ||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "Optional") | ||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/springzfx/cgproxy") | ||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "[email protected]") | ||
set(CONTROL_DIR ${CMAKE_SOURCE_DIR}/control) | ||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CONTROL_DIR}/postinst;${CONTROL_DIR}/prerm") | ||
|
||
set(CPACK_RPM_PACKAGE_ARCHITECTURE, "x86_64") | ||
set(CPACK_RPM_PACKAGE_REQUIRES "systemd") | ||
set(CPACK_RPM_PACKAGE_GROUP "network") | ||
set(CPACK_RPM_PACKAGE_URL "https://github.com/springzfx/cgproxy") | ||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CONTROL_DIR}/postinst") | ||
set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${CONTROL_DIR}/prerm") | ||
|
||
include(CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
systemctl enable --now cgproxy.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
systemctl disable --now cgproxy.service |