mkdir -p /usr/local/postgresql/lib
cd /new_enc/postgresql-14.2/src/interfaces/libpq/encryptsql
make clean
mkdir build && cd build
cmake .. -DENCRYPTSQL_INSTALL_DIR=/usr/local/postgresql
make -j `nproc`
rm -f /usr/local/postgresql/lib/libudf.so
cp /new_enc/postgresql-14.2/src/interfaces/libpq/encryptsql/build/lib/libudf.so /usr/local/postgresql/lib/
rm -f /usr/local/postgresql/lib/libencryptsql.so
cp /new_enc/postgresql-14.2/src/interfaces/libpq/encryptsql/build/lib/libencryptsql.so /usr/local/postgresql/lib/

