Skip to content

Commit

Permalink
test(debug): package config debug
Browse files Browse the repository at this point in the history
  • Loading branch information
parfeon committed Nov 20, 2024
1 parent 30b866b commit e17a9ea
Showing 1 changed file with 48 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,54 @@
#!/bin/bash
set -e
#
#ls /usr/include/openssl
#ls /usr/lib/x86_64-linux-gnu/libssl.so

ls /usr/lib/x86_64-linux-gnu/pkgconfig
echo "----"
openssl version
echo "----"
if [ ! -f /usr/lib/x86_64-linux-gnu/pkgconfig/openssl.pc ]; then
echo "'openssl' package config not found!"
else
echo "'openssl' package configuration exists"
fi
echo "----"
if [ ! -f /usr/lib/x86_64-linux-gnu/pkgconfig/libssl.pc ]; then
echo "'libssl' package config not found!"
else
echo "'libssl' package configuration exists"

if [ ! -f /usr/lib/x86_64-linux-gnu/pkgconfig/openssl.pc ]; then
echo "'openssl' package config not found!"
sudo ln -s /usr/lib/x86_64-linux-gnu/pkgconfig/libssl.pc /usr/lib/x86_64-linux-gnu/pkgconfig/openssl.pc
else
echo "'openssl' package configuration exists"
fi
fi


if [ ! -f /usr/lib/x86_64-linux-gnu/pkgconfig/openssl.pc ]; then
OPENSSL_VERSION=$(openssl version | awk '{print $2}')
echo "prefix=/usr
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib/x86_64-linux-gnu
includedir=\${prefix}/include
Name: OpenSSL
Description: Secure Sockets Layer and cryptography libraries and tools
Version: $OPENSSL_VERSION
Requires:
Libs: -L\${libdir} -lssl -lcrypto
Cflags: -I\${includedir}" | sudo tee /usr/lib/x86_64-linux-gnu/pkgconfig/openssl.pc > /dev/null
fi


export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
echo "CFLAGS: '$(shell pkg-config --cflags openssl)'"
echo "LIBS: '$(shell pkg-config --libs openssl)'"

ls /usr/include/openssl
ls /usr/lib/x86_64-linux-gnu/libssl.so

echo "::group::Run unit tests ('$1' $CC / $CXX)"
cd "$GITHUB_WORKSPACE/core"
Expand Down

0 comments on commit e17a9ea

Please sign in to comment.