File blt.spec of Package blt

#
# spec file for package blt (Version 2.4z)
#
# 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:           blt
BuildRequires:  tk-devel xorg-x11-devel
License:        BSD 3-Clause
Group:          Development/Libraries/Tcl
AutoReqProv:    on
Version:        2.4z
Release:        342.<RELEASE62>
Summary:        Tcl/Tk Extension
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        BLT%version.tar.bz2
Patch0:         blt2.4z-patch-2
Patch1:         blt%version.patch
Patch2:         blt-buildfix.patch
Patch3:         blt-exact.patch

%description
BLT is an extension to the Tk toolkit, adding new widgets, geometry
managers, and miscellaneous commands.



Authors:
--------
    George Howlett <george.howlett@att.com>

%prep
%setup -q -n %name%version
%patch0 -p 1
%patch1
%patch2
%patch3

%build
#%{?suse_update_config:%{suse_update_config -f cf}}
autoconf
CFLAGS="%optflags -fno-strict-aliasing" \
%configure \
	--with-tcl=%_libdir \
	--with-tk=%_libdir \
	--with-blt=%tclscriptdir
make
for f in $(find -name '*.tcl'); do
    sed '1s,^#!.*/\([^/]\+sh\)$,#!/usr/bin/\1,' $f > $f.new
    mv $f.new $f
done

%install
make install INSTALL_ROOT=%buildroot
ln -sf libBLT24.so %buildroot%_libdir/libBLT.so
ln -sf libBLTlite24.so %buildroot%_libdir/libBLTlite.so
ln -sf bltsh24 %buildroot/%_prefix/bin/bltsh
ln -sf bltwish24 %buildroot/%_prefix/bin/bltwish
cd %buildroot%_mandir/mann
for f in [[:lower:]]*.n ; do mv $f blt_$f ; done
for f in $(find %buildroot/%_libdir/blt?.? -type f); do
    if file $f | grep 'script text' >/dev/null; then
	chmod a+x $f
    else
	chmod a-x $f
    fi
done
chmod a-x %buildroot/usr/share/tcl/blt?.?/demos/htext.txt

%files
%defattr(-,root,root)
%doc INSTALL MANIFEST README PROBLEMS NEWS LICENSE
%doc html
%doc %_mandir/*/*
/usr/bin/blt*
/usr/include/blt*.h
%_libdir/libBLT*
%tclscriptdir

%changelog
* Thu Jan 08 2009 max@suse.de
- blt-exact.patch: Make runtime version checking less strict, so
  that BLT can be loaded into Tcl 8.5.5 with its changed version
  comparison semantics.
* Sun Apr 06 2008 ro@suse.de
- fix build with current tcl
* Tue Nov 07 2006 ro@suse.de
- fix permissions for text file (automatic does not work anymore)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 09 2006 max@suse.de
- Linking without rpath.
* Fri Jun 24 2005 max@suse.de
- Fixed pkgIndex.tcl.
* Fri Jun 17 2005 max@suse.de
- Moved script libraries to /uar/share/tcl .
* Fri Feb 06 2004 max@suse.de
- Added -fno-strict-aliasing to CFLAGS.
* Sat Jan 10 2004 adrian@suse.de
- add %%run_ldconfig
* Wed Jul 23 2003 max@suse.de
- Added tk-devel to neededforbuild.
* Mon May 26 2003 max@suse.de
- New version: 2.4z
* Mon Aug 12 2002 max@suse.de
- Installing pkgIndex.tcl at the right place.
* Thu Jul 11 2002 max@suse.de
- Fixed for Tcl/Tk 8.4.
* Tue Jun 04 2002 max@suse.de
- New version: 2.4y
- Fixed missing exec permissions of /usr/lib/blt2.4 and subdirs.
* Mon Feb 25 2002 max@suse.de
- Corrected path to shell and permissions of demo scripts.
* Wed Feb 20 2002 max@suse.de
- Patched configure instead of running autoconf, because BLT's
  autoconf stuff breaks on newer versions of autoconf.
* Wed Feb 20 2002 max@suse.de
- Fixed for lib64-s390x
* Fri Jan 18 2002 max@suse.de
- New version 2.4v
- using %%{_libdir}
- bltsh and bltwish are now linked dynamically to the BLT libs.
- Removed examples from %%doc because they only seem useful inside
  the source tree.
* Fri Jul 20 2001 max@suse.de
- fixed config path given to %%suse_update_config
* Fri Jul 20 2001 max@suse.de
- new version 2.4u .
- cleaned up spec file.
- using BuildRoot.
- stripping shared libs.
- added license text from C sources as separate doc file.
* Tue May 08 2001 mfabian@suse.de
- bzip2 sources
* Tue Dec 19 2000 max@suse.de
- fixed race condition in src/bltUnixPipe.c
* Wed Nov 29 2000 ro@suse.de
- changed neededforbuild <tcld> to <tcl-devel>
* Sat Nov 25 2000 schwab@suse.de
- Add unversioned link to versioned shared library.
* Wed Aug 02 2000 max@suse.de
- added bltsh and some header files to the file list.
- fixes bug #3687
* Mon May 08 2000 max@suse.de
- new version 2.4q
- works with Tcl/Tk 8.3
* Sat Apr 08 2000 bk@suse.de
- added suse update config macro
* Fri Nov 05 1999 max@suse.de
- changed tclsh's path to /usr/bin
* Mon Oct 11 1999 max@suse.de
- new version 2.4j
- moved from /usr/X11R6 to /usr
- ready for the new Tcl/Tk packages
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Thu Jan 14 1999 uli@suse.de
- prefixed all man pages with blt_ to avoid conflict with tk
* Wed Jan 13 1999 uli@suse.de
- update 1.9 -> 2.4g
- rewrote spec file
- moved from /usr to /usr/X11R6
* Mon Mar 02 1998 ro@suse.de
- fixed include paths for tcl_old tk_old
openSUSE Build Service is sponsored by