File iwidgets.spec of Package iwidgets

#
# spec file for package iwidgets (Version 4.0.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           iwidgets
BuildRequires:  tcl
Version:        4.0.1
Release:        370
License:        X11/MIT
Group:          Development/Languages/Tcl
Source0:        %name%version.tar.bz2
Patch0:         %name%version.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Summary:        Widget Extension for Tcl/Tk
Requires:       itk

%description
[incr Widgets] is an object-oriented mega-widget set that extends
Tcl/Tk and is based on [incr Tcl] and [incr Tk].  This set of
mega-widgets delivers many new, general purpose widgets like option
menus, comboboxes, selection boxes, and various dialogs whose
counterparts are found in Motif and Windows. Since [incr Widgets] is
based on the [incr Tk] extension, the Tk framework of configuration
options, widget commands, and default bindings is maintained.  In other
words, each [incr Widgets] mega-widget seamlessly blends with the
standard Tk widgets. They look, act, and feel like Tk widgets. In
addition, all [incr Widgets] mega-widgets are object oriented and may
themselves be extended, using either inheritance or composition.



Authors:
--------
    Michael J. McLennan <michael.mclennan@att.com>
    Dr. John Ousterhout <john.ousterhout@eng.sun.com>

%prep
%setup -q -n %name%version
%patch0

%build
%{suse_update_config}
autoconf
%configure --with-tcl=%_libdir --with-tk=%_libdir
make

%install
rm -rf %buildroot
make install \
	INSTALL=/usr/bin/install \
	MKINSTALLDIRS="mkdir -p" \
	INSTALL_ROOT=%buildroot \
	MAN_INSTALL_DIR='$(INSTALL_ROOT)%_mandir/mann' \
	SCRIPT_INSTALL_DIR=%buildroot%tclscriptdir/%name%version
# Put the right path to wish into the iwidget demos,
# and fix the permissions.
for f in $(find %buildroot%_prefix/lib/%name%version/demos %buildroot%tclscriptdir/%name%version/demos -type f); do
    if test -x $f && grep 'package require Iwidgets' $f > /dev/null; then
        ( echo '#!/usr/bin/wish'; cat $f ) > $f.new
        mv $f.new $f
        chmod a+x $f
    else
        chmod a-x $f
    fi
done

%clean
rm -rf %buildroot

%files
%defattr(-,root,root,-)
%doc CHANGES ChangeLog README
%doc %_mandir/mann/*
%tclscriptdir/%name%version

%changelog
* Mon May 19 2008 max@suse.de
- Change Requires to reflect the split of itk from itcl.
* Fri Nov 10 2006 ro@suse.de
- fix docu permissions
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jun 17 2005 max@suse.de
- Moved the sctipt library to /usr/share/tcl .
* Mon Feb 02 2004 hmacht@suse.de
- added option # norootforbuild in specfile
* Wed Jul 23 2003 max@suse.de
- Removed unneeded stuff from neededforbuild.
* Mon Jan 13 2003 max@suse.de
- This package has been split off from itcl, because the sources
  are separate projects now.
- New version 4.0.1.
- As the dependencies for Tcl extensions can't currently be
  tracked automatically, packages that depend on itcl might
  need to be changed to depend on iwidgets as well, if they
  actually use it.
openSUSE Build Service is sponsored by