There are two main "package managers" used on MacOS: Homebrew and MacPorts. Trunk-recorder can be installed with dependencies from one or the other
See the Brew homepage for more information.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"Install GNURadio, the OsmoSDR package for GNURadio, CMake, pkgconfig, cppunit, and openssl through Homebrew:
brew install gnuradio uhd gr-osmosdr cmake pkgconfig cppunit openssl fdk-aac-encoder soxNote that you will need to provide the flag -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl to the invocation of cmake in the Build Instructions or you will receive an error from CMake about not finding libssl or a linking error from make about not having a library for -lssl:
cmake ../trunk-recorder -DOPENSSL_ROOT_DIR=/usr/local/opt/opensslFollow the instructions from the MacPorts project to install the appropriate version of MacPorts for your version of macOS.
If you have already installed MacPorts, make sure your ports tree is up to date:
sudo port selfupdate(7/24/21) Note: this has been tested and works on an M1 based Mac. Some dependencies for gr-osmosdr do not support ARM64 yet and can be removed by adding a -, eg: -docs
The preferred method for installing GNU Radio on macOS is:
sudo port install gnuradio uhd gr-osmosdrsudo port install cmake boost libusb cppunitIf you are interested in uploading recordings to OpenMHz, install FDK-AAC and Sox to convert the Wav files to M4a.
sudo port install soxDownload and make libfdk-aac.
1) extract the source, and cd to the source directory
2) autoreconf -i
3) ./configure
4) make
5) sudo make installDownload and make the command line fdkaac program.
1) extract the source, and cd to the source directory
2) autoreconf -i
3) ./configure
4) make
5) sudo make installThe next step is to configure Trunk Recorder for the system you are trying to capture.
If all goes well you should now have the executable named trunk-recorder, and created the config.json configuration file as described in the Wiki and README.
From your build directory (e.g. trunk-build) you can now run
./trunk-recorder
Trunk Recorder will look for a config.json file in the same directory as it is being run in. You can point it to a different config file by using the --config argument on the command line, for example: ./trunk-recorder --config=examples/config-wmata-rtl.json.