Blob Blame History Raw
Name:           iwidgets
Version:	4.0.1        
Release:        3%{?dist}
Summary:        A set of useful widgets based on itcl and itk

Group:          Development/Libraries
License:        BSD
URL:            http://incrtcl.sourceforge.net/
Source0:	http://easynews.dl.sourceforge.net/sourceforge/incrtcl/iwidgets4.0.1.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
Requires:       itk

%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/%{_datadir}/%{name}%{version}
install -p -m 644 generic/*.* $RPM_BUILD_ROOT/%{_datadir}/%{name}%{version}
install -p -m 644 generic/tclIndex $RPM_BUILD_ROOT/%{_datadir}/%{name}%{version}
install -p -m 644 iwidgets.tcl $RPM_BUILD_ROOT/%{_datadir}/%{name}%{version}
install -p -m 644 pkgIndex.tcl $RPM_BUILD_ROOT/%{_datadir}/%{name}%{version}

mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}%{version}/demos
for i in demos/* ; do
    if [ -f $i ] ; then
        install -p -m 644 $i $RPM_BUILD_ROOT/%{_datadir}/%{name}%{version}/demos
    fi
done
chmod 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}%{version}/demos/catalog
# Remove rpmlint warning.
chmod 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}%{version}/demos/scopedobject

mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}%{version}/demos/images
install -p -m 644 demos/images/*.* $RPM_BUILD_ROOT/%{_datadir}/%{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/%{_datadir}/%{name}%{version}/demos/html
install -p -m 644 demos/html/*.html $RPM_BUILD_ROOT/%{_datadir}/%{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,-)
%{_datadir}/iwidgets%{version}
%{_mandir}/mann/*
%doc README license.terms doc/iwidgets.ps

%changelog
* Fri Dec 29 2005 Wart <wart at kobold.org> - 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 <wart at kobold.org> - 4.0.1-2
- Initial spec file for Fedora Extras

* Thu Nov 24 2005 Wart <wart at kobold.org> - 4.0.1-1
- Initial spec file for personal use