|
| 1 | +# FreeSWITCH Build Dependencies |
| 2 | + |
| 3 | +This directory is organized into subfolders, where each subfolder contains build instructions for a single Debian package. These packages are dependencies required to build FreeSWITCH's Debian packages. |
| 4 | + |
| 5 | +## Recommended order of building: |
| 6 | + |
| 7 | +- [libbroadvoice](libbroadvoice/README.md) |
| 8 | +- [libilbc](libilbc/README.md) |
| 9 | +- [libsilk](libsilk/README.md) |
| 10 | +- [spandsp](spandsp/README.md) |
| 11 | +- [sofia-sip](sofia-sip/README.md) |
| 12 | +- [libks](libks/README.md) |
| 13 | +- [signalwire-c](signalwire-c/README.md) |
| 14 | +- [libv8](libv8/README.md) (only for `AMD64`) |
| 15 | + |
| 16 | +## Build Dependencies Script |
| 17 | + |
| 18 | +A convenient script `build-dependencies.sh` is provided to automate the building of dependencies. This script offers several options to customize the build process. |
| 19 | + |
| 20 | +### Usage |
| 21 | + |
| 22 | +```bash |
| 23 | +./build-dependencies.sh [options] [library_names...] |
| 24 | +``` |
| 25 | + |
| 26 | +### Options |
| 27 | + |
| 28 | +- `-h, --help`: Show the help message |
| 29 | +- `-b, --build-number N`: Set build number (default: 42 or env value) |
| 30 | +- `-a, --all`: Build all libraries |
| 31 | +- `-s, --setup`: Set up build environment before building |
| 32 | +- `-o, --output DIR`: Set output directory (default: /var/local/deb) |
| 33 | +- `-p, --prefix DIR`: Set source path prefix (default: /usr/src) |
| 34 | +- `-r, --repo`: Set up local repository after building |
| 35 | +- `-c, --clone`: Clone required repositories before building |
| 36 | +- `-g, --git-https`: Use HTTPS instead of SSH for git cloning |
| 37 | + |
| 38 | +### Examples |
| 39 | + |
| 40 | +Set up environment, clone repositories, and build all dependencies: |
| 41 | +```bash |
| 42 | +./build-dependencies.sh --build-number 123 --setup --all --repo --clone |
| 43 | +``` |
| 44 | + |
| 45 | +Complete build with all options (setup environment, build all libraries, create local repo, clone repos with HTTPS): |
| 46 | +```bash |
| 47 | +./build-dependencies.sh --build-number 123 --setup --all --repo --clone --git-https |
| 48 | +``` |
| 49 | + |
| 50 | +Build specific libraries with full automation: |
| 51 | +```bash |
| 52 | +./build-dependencies.sh --build-number 123 --setup --repo --clone --git-https libks signalwire-c |
| 53 | +``` |
| 54 | + |
| 55 | +### Running in Docker |
| 56 | + |
| 57 | +You can run the build script inside a Docker container for a clean, isolated build environment: |
| 58 | + |
| 59 | +```bash |
| 60 | +docker run -it -v $(pwd):/root/scripts debian:bookworm bash -c "cd /root/scripts && bash" |
| 61 | +``` |
0 commit comments