%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%(echo 'puts $tcl_version' | tclsh)} Name: tdom Version: 0.9.6 Release: %autorelease Summary: DOM parser for Tcl # Most files MPL except for ./generic/xmlsimple.c and ./generic/domhtml.c # which are LGPLV2+. # Automatically converted from old format: LGPLv2+ - review is highly recommended. License: LicenseRef-Callaway-LGPLv2+ URL: http://www.tdom.org Source0: http://www.tdom.org/downloads/tdom-%{version}-src.tgz #Patch0: tdom-0.8.2-noexpat.patch #Patch1: tdom-0.8.2-tcl8.6.patch #Patch2: tdom-configure-c99.patch BuildRequires: make BuildRequires: gcc BuildRequires: tcl-devel expat-devel Requires: tcl(abi) = 8.6 %description tDOM combines high performance XML data processing with easy and powerful Tcl scripting functionality. tDOM should be one of the fastest ways to manipulate XML with a scripting language and uses very little memory. %package devel Summary: Development files for compiling against tdom Requires: %{name} = %{version}-%{release} expat-devel %description devel Development header files for compiling against tdom. %prep %autosetup -C %patch -P0 -p1 %patch -P1 -p1 %patch -P2 -p1 %build %configure --enable-threads --with-expat=yes %make_build rm -rf expat %install %make_install mkdir -p %{buildroot}%{tcl_sitearch} mv %{buildroot}%{_libdir}/%{name}%{version}/*.so %{buildroot}%{_libdir} mv %{buildroot}%{_libdir}/%{name}%{version}/*.a %{buildroot}%{_libdir} mv %{buildroot}%{_libdir}/%{name}%{version} %{buildroot}%{tcl_sitearch} # Adjust some paths to reflect the new file locations sed -i -e 's/file join $dir libtdom/file join $dir .. .. libtdom/' %{buildroot}%{tcl_sitearch}/%{name}%{version}/pkgIndex.tcl sed -i -e "s#%{_libdir}/%{name}%{version}#%{_libdir}#" %{buildroot}%{_libdir}/tdomConfig.sh %files %doc README.md LICENSE CHANGES ChangeLog doc/*.html %{tcl_sitearch}/%{name}%{version} %{_libdir}/*.so %exclude %{_libdir}/*.a %{_mandir}/mann/*.gz %files devel %{_libdir}/%{name}Config.sh # This static library is a 'stub' library that is used to assist with # shared lib linking across library versions: http://wiki.tcl.tk/285 %{_libdir}/*.a %{_includedir}/*.h %changelog %autochangelog