From cf28256a57399fff8f0bd4e4267d57c17a49a685 Mon Sep 17 00:00:00 2001 From: lijia Date: Tue, 9 Apr 2024 10:11:58 +0800 Subject: fix build RPM package, update cmake/Preinsall, cmake/PreUninstall --- cmake/PreInstall.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cmake/PreInstall.sh (limited to 'cmake/PreInstall.sh') diff --git a/cmake/PreInstall.sh b/cmake/PreInstall.sh new file mode 100644 index 0000000..db2b917 --- /dev/null +++ b/cmake/PreInstall.sh @@ -0,0 +1,13 @@ +DST=${RPM_INSTALL_PREFIX}/sapp/ + +mkdir -p ${DST}/stellar_plugin +touch ${DST}/stellar_plugin/spec.toml + +if ! grep -q '^\./plug/stellar_plugin/http_decoder.so' "${DST}/stellar_plugin/spec.toml"; then + echo -e "\n" >> "${DST}/stellar_plugin/spec.toml" + echo -e "[[plugin]]" >> "${DST}/stellar_plugin/spec.toml" + echo -e "path = \"./stellar_plugin/http_decoder/http_decoder.so\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "init = \"http_decoder_init\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "exit = \"http_decoder_exit\"" >> "${DST}/stellar_plugin/spec.toml" + echo -e "\n" >> "${DST}/stellar_plugin/spec.toml" +fi -- cgit v1.2.3