This library requires libcurl built with OpenSSL support and package config.
sudo apt-get install libssl-dev
sudo apt install libcurl4-openssl-dev
sudo apt-get install pkg-config
sudo add-apt-repository ppa:team-xbmc/ppa -y
sudo apt-get update
sudo apt-get install nlohmann-json3-dev
Install Google Test
sudo apt-get update -y
sudo apt-get install -y libgtest-dev
sudo apt-get install -y cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
# copy or symlink libgtest.a and libgtest_main.a to your /usr/lib folder
sudo cp *.a /usr/lib
Additionally, if you used the standard git clone command to pull down the repo without initializing the submodule, you may have to run the following to initialize the submodule:
git submodule update –recursive –init
./configure
make
sudo make install
cmake CMakeLists.txt
make
./dcap_provider_utests
If cmake needs to update, please run:
sudo apt remove cmake
sudo apt-get install python-pip
sudo pip install cmake --upgrade
./configure
- This pulls down prerequisites from other projects, finds correct local
paths, and creates
Makefile
- This pulls down prerequisites from other projects, finds correct local
paths, and creates
make
- Builds
libdcap_quoteprov.so
, the provider library.
- Builds
sudo make install
(optional)- Installs the library to
/usr/local/lib
and header to/usr/local/include
.
- Installs the library to
make DEBUG=1
(optional)- Builds the library with the -g flag
To build a Debian package, you'll need an Ubuntu/Debian system with the
build-essential package (sudo apt install build-essential
) and dh-virtualenv
(sudo apt-get install debhelper dh-virtualenv
) installed.
- Update
src/Linux/debian/changelog
with a description of the changes which require a new package to be published. - Copy over the files in
src
to a new directory calledaz-dcap-client-{VERSION}
, where {VERSION} the latest version number specified in Linux/debian/changelog. - Run the following commands:
tar czf az-dcap-client_{VERSION}.orig.tar.gz az-dcap-client-{VERSION}
cd az-dcap-client-{VERSION}/Linux && dpkg-buildpackage -us -uc
The output deb file is suitable for installation on any amd64 Ubuntu system.
In Ubuntu 20.04, please run this command to install dh-virtualenv:
sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install virtualenv
Install fakeroot:
sudo apt install build-essential devscripts debhelper check libsubunit-dev fakeroot
- You're seeing cryptic errors such as ": No such file or directory":
- This can happen if the files are copied from a Windows host to a Linux host. Run dos2unix on all files to be sure none of them have Windows line-endings.