# 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
%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
%files -n %{name}-hal-devel
%license LICENSE
+%config %{macro_file_path}
%{_includedir}/webauthn*.h
%{lib_dir}/pkgconfig/%{name}-hal.pc