--- libdb4.3.spec.orig 2005-10-13 15:15:46 +0400 +++ libdb4.3.spec.orig 2005-12-12 09:15:36 +0300 @@ -310,7 +310,7 @@ %{subst_enable test} \ %{subst_enable uimutexes} \ %{subst_enable umrw} \ - --with-tcl=%_libdir \ + %{?_enable_tcl:--with-tcl=%_libdir} \ # # Remove libtool predep_objects and postdep_objects wonkiness %__subst -p 's/-shared -nostdlib/-shared/' libtool @@ -322,7 +322,10 @@ rm -f examples_*/tags %install -mkdir -p %buildroot{/%_lib,%_libdir,%_tcllibdir,%_tcldatadir/Db_tcl,%_includedir/db4} +mkdir -p %buildroot{/%_lib,%_libdir,%_includedir/db4} +%if_enabled tcl +mkdir -p %buildroot{%_tcllibdir,%_tcldatadir/Db_tcl} +%endif %define docdir %_docdir/%srcname %makeinstall -C build_unix docdir=%buildroot%docdir @@ -349,8 +352,10 @@ popd rm .%_libdir/libdb_int-*.a +%if_enabled tcl mv .%_libdir/libdb_tcl* .%_tcllibdir/ rm .%_tcllibdir/*.la +%endif mv .%_includedir/*.h .%_includedir/db4/ %__ln_s db4/db.h db4/db_185.h .%_includedir/ @@ -359,7 +364,9 @@ #done popd +%if_enabled tcl %tea_makeindex -f libdb_tcl-%_sover.so -C %buildroot%_tcldatadir/Db_tcl +%endif %if_enabled java # Move java jar file to the correct place. @@ -371,7 +378,7 @@ for n in db%_sover-utils \ %name{,-devel{,-static}} \ %{name}_cxx{,-devel{,-static}} \ - %{name}_tcl{,-devel{,-static}} \ + %{?_enable_tcl:%{name}_tcl{,-devel{,-static}}} \ %{name}_java{,-devel{,-static}}; do echo "${n/%_sover/4}" >"%buildroot%_sysconfdir/buildreqs/packages/substitute.d/$n" done