%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
%global realname tktreectrl
Name: tcl-%{realname}
Version: 2.2.10
Release: 1%{?dist}.1
Summary: Multi-column hierarchical listbox widget for Tk
Group: System Environment/Libraries
License: TCL
URL: http://tktreectrl.sourceforge.net/
Source0: http://downloads.sourceforge.net/tktreectrl/%{realname}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Obsoletes: tk-%{realname} < 2.2.3-6
Provides: %{realname} = %{version}-%{release}
Provides: tk-%{realname} = %{version}-%{release}
BuildRequires: tk-devel
Requires: tcl(abi) = 8.5 tk
%description
TkTreeCtrl is a flexible listbox widget for Tk.
%prep
%setup -q -n %{realname}-%{version}
chmod -x ChangeLog README.txt license.terms doc/*.html generic/*
%build
%configure --with-tcl=%{tcl_sitearch}
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
install -d %{buildroot}%{tcl_sitearch}
mv %{buildroot}%{_libdir}/treectrl%{version} %{buildroot}%{tcl_sitearch}/treectrl%{version}
# Remove documentation files from the installation tree
rm -rf $RPM_BUILD_ROOT%{tcl_sitearch}/treectrl%{version}/htmldoc
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README.txt license.terms ChangeLog doc/*.html
%{tcl_sitearch}/treectrl%{version}/
%{_mandir}/mann/treectrl*
%changelog
* Wed Jan 20 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.2.10-1.1
- Change define -> global to fix build issue with epel-rpm-macros.
* Mon Jun 14 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2.10-1
- update to 2.2.10
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon May 13 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2.9-1
- update to 2.2.9
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Thu Dec 18 2008 Wart <wart@kobold.org> 2.2.8-2
- Move html documentation to proper doc directory
- Add missing Requires: on tk
- Remove redundant BuildRequires. Everything necessary is brought in by
tk-devel.
* Fri Oct 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.8-1
- update to 2.2.8
* Mon Jun 9 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.5-1
- initial package for Fedora