mirror of
https://github.com/springzfx/cgproxy.git
synced 2026-04-23 10:11:04 +08:00
build deb and rpm static prefered
This commit is contained in:
@@ -6,7 +6,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "cgproxy will transparent proxy anything r
|
|||||||
## deb pack
|
## deb pack
|
||||||
set(CPACK_DEBIAN_PACKAGE_NAME "cgproxy")
|
set(CPACK_DEBIAN_PACKAGE_NAME "cgproxy")
|
||||||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "systemd, libbpf0")
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "systemd")
|
||||||
set(CPACK_DEBIAN_PACKAGE_SECTION "network")
|
set(CPACK_DEBIAN_PACKAGE_SECTION "network")
|
||||||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "Optional")
|
set(CPACK_DEBIAN_PACKAGE_PRIORITY "Optional")
|
||||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/springzfx/cgproxy")
|
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/springzfx/cgproxy")
|
||||||
@@ -15,7 +15,7 @@ set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst;${C
|
|||||||
|
|
||||||
## rpm pack
|
## rpm pack
|
||||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE, "x86_64")
|
set(CPACK_RPM_PACKAGE_ARCHITECTURE, "x86_64")
|
||||||
set(CPACK_RPM_PACKAGE_REQUIRES "systemd, libbpf")
|
set(CPACK_RPM_PACKAGE_REQUIRES "systemd")
|
||||||
set(CPACK_RPM_PACKAGE_GROUP "network")
|
set(CPACK_RPM_PACKAGE_GROUP "network")
|
||||||
set(CPACK_RPM_PACKAGE_URL "https://github.com/springzfx/cgproxy")
|
set(CPACK_RPM_PACKAGE_URL "https://github.com/springzfx/cgproxy")
|
||||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/postinst")
|
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/postinst")
|
||||||
|
|||||||
32
readme.md
32
readme.md
@@ -53,25 +53,33 @@ Main feature:
|
|||||||
|
|
||||||
ubuntu 16.04, debian 9, fedora 27 and later are desired
|
ubuntu 16.04, debian 9, fedora 27 and later are desired
|
||||||
|
|
||||||
## How to install
|
## How to build and install
|
||||||
|
|
||||||
### main depency
|
### distro install
|
||||||
|
|
||||||
| os | build depency | runtime depency | download |
|
- For debian and redhat series, download from [Release page](https://github.com/springzfx/cgproxy/releases)
|
||||||
| --------- | ------------------------------------------------------------ | ----------------------------------------------------- | ------------------------------------------------------------ |
|
|
||||||
| Archlinux | clang, nlohmann-json, libbpf | libbpf | [archlinux AUR](https://aur.archlinux.org/packages/?K=cgproxy) |
|
|
||||||
| Ubuntu | clang, nlohmann-json, [libbpf-dev](https://packages.ubuntu.com/groovy/libbpf-dev) | [libbpf0](https://packages.ubuntu.com/groovy/libbpf0) | [Release page](https://github.com/springzfx/cgproxy/releases) |
|
|
||||||
| Fedora | clang, nlohmann-json,[libbpf](https://src.fedoraproject.org/rpms/libbpf) | [libbpf](https://src.fedoraproject.org/rpms/libbpf) | [Release page](https://github.com/springzfx/cgproxy/releases) |
|
|
||||||
|
|
||||||
tested in arch and ubuntu 20.04.
|
- For archlinux series, see[archlinux AUR](https://aur.archlinux.org/packages/?K=cgproxy)
|
||||||
|
|
||||||
|
- Already tested on Archlinux, fedora 32, ubuntu 20.04, deepin v20 beta
|
||||||
|
|
||||||
### build
|
### build
|
||||||
|
|
||||||
|
- before build, install depencies: clang, nlohmann-json, libbpf
|
||||||
|
- then cmake standard build
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#
|
# ready build dir
|
||||||
mkdir build && cd build
|
mkdir build
|
||||||
# cmake
|
cd build
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. && make install
|
# generate
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-Dbuild_execsnoop_dl=ON \
|
||||||
|
-Dbuild_static=OFF \
|
||||||
|
..
|
||||||
|
# compile
|
||||||
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
## Default usage
|
## Default usage
|
||||||
|
|||||||
Reference in New Issue
Block a user