Defines WEBAUTHN_HYBRID_PLUGIN_SO_PATH in rpm macro file
authorDongsun Lee <ds73.lee@samsung.com>
Thu, 4 Jan 2024 00:05:57 +0000 (09:05 +0900)
committer이동선/Security&Privacy팀(SR)/삼성전자 <ds73.lee@samsung.com>
Thu, 4 Jan 2024 01:45:57 +0000 (10:45 +0900)
packaging/webauthn.spec

index 633139694fb2c2f42328e58d4d4e6e912c0fd39c..97515b351bdd932db21c75ff1924db9f21cb2aab 100644 (file)
@@ -92,7 +92,8 @@ Web Authentication Service (unit tests)
 # Macros for plugin SO path
 %define plugin_dir                 %{lib_dir}
 %define hybrid_plugin_so_name      webauthn_plugin_hybrid.so
-%define hybrid_plugin_so_path      %{PLUGIN_DIR}/%{PLUGIN_SO_NAME}
+%define hybrid_plugin_so_path      %{plugin_dir}/%{hybrid_plugin_so_name}
+%define macro_file_path %{ro_etc_dir}/rpm/macros.%{name}
 
 %prep
 %setup -q
@@ -123,6 +124,12 @@ make %{?jobs:-j%jobs}
 %install_service multi-user.target.wants %{name}.service
 %install_service sockets.target.wants %{name}.socket
 
+# write macro
+mkdir -p %{buildroot}%{ro_etc_dir}/rpm
+touch %{buildroot}%{macro_file_path}
+echo "%WEBAUTHN_HYBRID_PLUGIN_SO_PATH %{hybrid_plugin_so_path}" >> %{buildroot}%{macro_file_path}
+
+
 %post
 /sbin/ldconfig
 systemctl daemon-reload
@@ -175,6 +182,7 @@ fi
 
 %files -n %{name}-hal-devel
 %license LICENSE
+%config %{macro_file_path}
 %{_includedir}/webauthn*.h
 %{lib_dir}/pkgconfig/%{name}-hal.pc