%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitelib: %define tcl_sitelib %{_datadir}/tcl%{tcl_version}} Name: iwidgets Version: 4.0.2 Release: 1 Summary: A set of useful widgets based on itcl and itk Group: Development/Libraries License: MIT URL: http://incrtcl.sourceforge.net/ Source0: http://downloads.sourceforge.net/sourceforge/incrtcl/iwidgets4.0.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: tcl(abi) = 8.5 itk BuildRequires: tcl %description A set of useful widgets based on itcl and itk. %prep %setup -q -n iwidgets4.0.1 %build # The configure script and Makefile for this package is horribly broken. # Installation is simple enough that it's easier to manually install the # files than try to patch the configure script and Makefile to work. sed -e "s#@ITCL_VERSION@#3.2#" -e "s#@VERSION@#%{version}#" < iwidgets.tcl.in > iwidgets.tcl sed -e "s#@VERSION@#%{version}#" < pkgIndex.tcl.in > pkgIndex.tcl %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version} install -p -m 644 generic/*.* $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version} install -p -m 644 generic/tclIndex $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version} install -p -m 644 iwidgets.tcl $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version} install -p -m 644 pkgIndex.tcl $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version} mkdir -p $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version}/demos for i in demos/* ; do if [ -f $i ] ; then install -p -m 644 $i $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version}/demos fi done chmod 755 $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version}/demos/catalog # Remove rpmlint warning. chmod 755 $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version}/demos/scopedobject mkdir -p $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version}/demos/images install -p -m 644 demos/images/*.* $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version}/demos/images # These html pages are part of the demonstration scripts, so they aren't # packaged with the rest of the documentation. mkdir -p $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version}/demos/html install -p -m 644 demos/html/*.html $RPM_BUILD_ROOT/%{tcl_sitelib}/%{name}%{version}/demos/html mkdir -p $RPM_BUILD_ROOT/%{_mandir}/mann install -p -m 644 doc/*.n $RPM_BUILD_ROOT/%{_mandir}/mann/ # This file conflicts with the one from tk-devel rm $RPM_BUILD_ROOT/%{_mandir}/mann/panedwindow.n # This file conflicts with the one from tklib rm $RPM_BUILD_ROOT/%{_mandir}/mann/datefield.n %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{tcl_sitelib}/iwidgets%{version} %{_mandir}/mann/* %doc README license.terms doc/iwidgets.ps %changelog * Wed Jan 28 2009 Tyler Cassidy - 4.0.2-1 - Modified for CentOS 5.2. * Fri Jan 11 2008 Wart - 4.0.2-1 - Update to 4.0.2 using a patch from CVS - Rebuild for tcl 8.5 * Sun Aug 19 2007 Wart - 4.0.1-5 - License tag clarification - Better download URL * Mon Aug 28 2006 Wart - 4.0.1-4 - Rebuild for Fedora Extras * Fri Dec 29 2005 Wart - 4.0.1-3 - Updated source url - Change Requires: based on bz #174265 - Manually install all files instead of depending on the broken configure script and Makefile. * Fri Nov 25 2005 Wart - 4.0.1-2 - Initial spec file for Fedora Extras * Thu Nov 24 2005 Wart - 4.0.1-1 - Initial spec file for personal use