--- xapian-bindings.spec	(revision 12396)
+++ xapian-bindings.spec	(working copy)
@@ -18,4 +18,8 @@
 %endif
 
+%if 0%{?!_without_tcl8:1}
+%define tcl_lib %(echo 'foreach d $tcl_pkgPath {if {![regexp {/share(/|$)} $d]} {break}};puts $d'|tclsh)
+%endif
+
 Summary: Bindings for the Xapian Probabilistic Information Retrieval Library
 Name: xapian-bindings
@@ -158,5 +162,5 @@
 %files tcl8
 %defattr(-, root, root)
-%{_datadir}/xapian%{version}
+%{tcl_lib}/xapian%{version}
 %doc %{_datadir}/doc/%{name}-tcl8-%{version}
 %endif

