%define tclmajor 8.4
%define majorver 2.6

Summary: A Tcl/Tk development environment: thread
Summary(ja): Tcl/Tk 開発環境: thread
Name: thread
Version: %{majorver}.5
Release: 1%{?_dist_release}
License: BSD
Group: Development/Languages
BuildRequires: libtool, util-linux, perl, gdbm
BuildRequires: tcl >= %{tclmajor}
BuildRequires: tk >= %{tclmajor}
Requires: tcl >= %{tclmajor}
Requires: tk >= %{tclmajor}
Buildroot: %{_tmppath}/%{name}-%{version}-root
URL: http://tcl.sourceforge.net/
Source0: http://prdownloads.sourceforge.net/tcl/%{name}%{version}.tar.gz

%description
You can use this extension to gain script-level access to Tcl threading capabilities.

%prep

%setup -q -n %{name}%{version}

%build
chmod 755 ./configure
%configure \
--with-tcl=%{_libdir} --with-tk=%{_libdir}  --enable-shared \
--enable-threads --enable-64bit
make %{?_smp_mflags}

%install
rm -rf ${RPM_BUILD_ROOT}
%makeinstall

echo "%%defattr(-,root,root)" > thread.files
(find ${RPM_BUILD_ROOT}%{_mandir} -type f -o -type l;
 find ${RPM_BUILD_ROOT}%{_libdir}/*) | cat - *.files \
	| sort | uniq -u >> thread.files

set +x +H
for n in `cat thread.files`; do
	test -f $n || continue
	head -1 $n | grep -q ^#! || continue
	chmod u+w $n
	perl -pi -e "s|${RPM_BUILD_ROOT}||" $n
done
set -x -H

#
# post process the *.files list, removing build sys references and mark
# which are directories
set +x
for n in *.files; do
	mv $n $n.in
	sed "s|.*%{_prefix}\\>|%{_prefix}|" < $n.in | while read file; do
	    if [ -d ${RPM_BUILD_ROOT}/$file ]; then
		echo -n '%dir '
	    fi
	    echo $file
	done > $n
	rm -f $n.in
done
set -x

#
# Man pages can be compressed
perl -pi -e 's|(^%{_mandir}/man.*$)|\1\*|' *.files

%post -p /sbin/ldconfig -n thread

%postun -p /sbin/ldconfig -n thread

%clean
rm -rf ${RPM_BUILD_ROOT}
rm -f *.files

%files -f thread.files -n thread

%changelog
* Sat Jul 26 2008 Shu KONNO <owa@bg.wakwak.com> 2.6.5-1vl5
- applied new versioning policy and spec in utf-8

* Sun Feb 17 2008 Shu KONNO <owa@bg.wakwak.com> 2.6.5-0vl3
- rebuild with tcl/tk-8.4.18

* Tue Oct 09 2007 Shu KONNO <owa@bg.wakwak.com> 2.6.5-0vl2
- rebuild with tcl/tk-8.4.16

* Wed Jun 13 2007 Shu KONNO <owa@bg.wakwak.com> 2.6.5-0vl1
- update thread to 2.6.5
- rebuilt with new toolchain

* Sun Jan 29 2006 Shu KONNO <owa@bg.wakwak.com> 2.6.2-0vl2
- rebuild for tcl/tk-8.4.12, and x86_64 architecture support

* Fri Sep 09 2005 Shu KONNO <owa@bg.wakwak.com> 2.6.2-0vl1
- update thread to 2.6.2
- rebuilt for tcl/tk-8.4.11

* Wed Jun 30 2004 Shu KONNO <owa@bg.wakwak.com> 2.5.2-0vl2
- rebuild for tcl/tk-8.4.6

* Mon Jan 12 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 2.5.2-0vl1
- source update

* Mon Mar 31 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 2.5.1-0vl1
- modified for Vine Linux
- splite source package

* Wed Mar 05 2003 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 83bw
- update Tcl/Tk 8.4.2

* Wed Feb 12 2003 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 82bw
- update thread 2.5
- update expect-20030203 (nightly-cvs)
- remove xotcl

* Wed Nov 20 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 81bw
- add config patch for Trf
- add static libraries of Tcl and Tk
- add tbcload and tclcompiler again

* Fri Nov 15 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 80bw
- build on RH 8.0
- update expect 5.38.0
- remove tcllib module, which will be separate RPM from this.
- remove tbcload module, which will be separate RPM from this.
- remove tclcompiler module, which will be separate RPM from this.
- add XOTcl 1.0
- add Tcl-Trf 2.1p2
- add Memchan 2.2a4

* Sat Oct 29 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 79bw
- fix to make XIC free, and eliminate XCloseIM when exiting Tk.

* Sat Oct 26 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 78bw
- update Tcl/Tk 8.4.1.

* Fri Oct 11 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 77bw
- correct install sequence in Tk.

* Sat Sep 25 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 76bw
- add TclPro tools: 
- tbcload CVS
- tclcompiler CVS

* Wed Sep 18 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 75bw
- add iwidgets4.0.1.
- correct symbolic link

* Sun Sep 15 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 74bw
- fix stub problem in itcl.

* Sun Sep 15 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 73bw
- adjust libary names to meet compatibility.

* Wed Sep 11 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 72bw
- update Tcl/Tk 8.4.0.
- update TclX 8.4.
- update tcllib 1.3.
- add thread2.4.

* Sat Feb 02 2002 Fuhito Suguri <bitwalk@jcom.home.ne.jp> 71bw
- update tcllib 1.2.

* Fri Jan 04 2002 Fuhito Suguri <bitwalk@nyc.odn.ne.jp> 70bw
- correct to install all of message catalogs for Img.

* Thu Dec 27 2001 Fuhito Suguri <bitwalk@nyc.odn.ne.jp> 69bw
- add tcl-8.3.4-encoding.patch for JIS encoding

* Wed Dec 26 2001 Fuhito Suguri <bitwalk@nyc.odn.ne.jp> 68bw
- update itcl 3.2.1

* Mon Nov 11 2001 Fuhito Suguri <bitwalk@nyc.odn.ne.jp> 67bw
- add link for tclth8.3 and wish8.3
- add img 1.2.4

* Sun Nov 04 2001 Fuhito Suguri <bitwalk@nyc.odn.ne.jp> 66bw
- update Tcl/Tk 8.3.4
- update tcllib 1.1
- update patch tcl-8.3.4-cruft.patch
- update patch tcl-8.3.4-makecfg.patch
- update patch tk-8.3.4-makecfg.patch

* Mon Aug 29 2001 Adrian Havill <havill@redhat.com>
- hard-coded the compat symlink for tix libdir. (bug 52812)

* Mon Aug 28 2001 Adrian Havill <havill@redhat.com>
- fixed itkwish/itclsh lib problem (bug 52608)
- make itcl install not need tclsh/wish during config/make (bug 52606)
- expect's fixline1 busted for expectk scripts (tkpasswd/tknewsbiff/tkterm)

* Mon Aug  8 2001 Adrian Havill <havill@redhat.com>
- changed rev for tcllib to 1.0
- added execute bit mode for itclsh and itksh compat shells
- re-enable glibc string and math inlines; recent gcc is a-ok.
- optimize at -O2 instead of -O
- rename "soname" patches related to makefile/autoconf changes
- added elf "needed" for tk, tclx, tix, itk
- removed warnings from tclX

* Wed Jul 25 2001 Adrian Havill <havill@redhat.com>
- added itclsh/itkwish for backwards compatibility, fixed rpath (bug 46086)
- fixed 64 bit RPM provides for dependencies

* Thu Jul 19 2001 Adrian Havill <havill@redhat.com>
- updated tclX to the latest version
- fixed tclX 8.3's busted help install
- eliminated make TK_LIB kludge for multiple math libs for tclX
- used %%makeinstall to brute force fix any remaining unflexible makefile dirs
- fixed bad ref count release in tcl (bug 49406)
- improved randomness of expect's mkpasswd script via /dev/random (bug 9507)
- revert --enable-threads, linux is (still) not ready (yet) (bug 49251)
- fixed DirTree in Tix (bug 45570)

* Sun Jul  8 2001 Adrian Havill <havill@redhat.com>
- refresh all sources to latest stable (TODO: separate expect/expectk)
- massage out some build stuff to patches (TODO: libtoolize hacked constants)
- remove patches already rolled into the upstream
- remove unneeded autopasswd
- removed RPATH (bugs 45569, 46085, 46086), added SONAMEs to ELFs
- changed shared object filenames to something less gross
- fixed tclX shell's argv parsing (bug 47710)
- reenable threads which seem to work now
- added all necessary header files for itcl (bug 41374)
- fixed spawn/eof read problem with expect (bug 43310)
- made compile-friendly for IA64

* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
- Bump release + rebuild for 7.2.

* Fri Mar 23 2001 Bill Nottingham <notting@redhat.com>
- bzip2 sources

* Mon Mar 19 2001 Bill Nottingham <notting@redhat.com>
- build with -D_GNU_SOURCE - fixes expect on ia64

* Mon Mar 19 2001 Preston Brown <pbrown@redhat.com>
- build fix from ahavill.

* Wed Feb 21 2001 Tim Powers <timp@redhat.com>
- fixed weather expect script using wrong server (#28505)

* Tue Feb 13 2001 Adrian Havill <havill@redhat.com>
- added "ja_JP.eucJP" to locale list for tcl

* Tue Feb 13 2001 Adrian Havill <havill@redhat.com>
- rebuild so make check passes

* Fri Oct 20 2000 Than Ngo <than@redhat.com>
- rebuild with -O0 on alpha (bug #19461)

* Thu Aug 17 2000 Jeff Johnson <jbj@redhat.com>
- summaries from specspo.

* Tue Aug  8 2000 Florian La Roche <Florian.LaRoche@redhat.de>
- remove symlink to libtixsam.so

* Thu Aug  3 2000 Jeff Johnson <jbj@redhat.com>
- merge "best known" patches from searching, stubs were broken.
- tix needs -fwritable-strings (#14352).
- create tixwish symlink.

* Thu Jul 27 2000 Jeff Johnson <jbj@redhat.com>
- rebuild against "working" util-linux col.

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Fri Jun 16 2000 Jeff Johnson <jbj@redhat.com>
- make sure that tix shared libraries are installed.
- don't mess with %%{_libdir}, it's gonna be a FHS pita.

* Sat Jun 10 2000 Jeff Johnson <jbj@redhat.com>
- move, not symlink, unix/tk8.0 to generate Tix pkgIndex.tcl correctly (#11940).

* Tue Jun  6 2000 Jeff Johnson <jbj@redhat.com>
- tclX had wrong version.

* Fri Jun  2 2000 Jeff Johnson <jbj@redhat.com>
- FHS packaging changes.
- revert --enable-threads, linux is not ready (yet) (#11789).
- tcl/tk: update to 8.3.1 (#10779).
- expect: update to 5.31.7+ (#11595).
- add tcllib-0.4.
- abstract major tcltk version for soname expansion etc.

* Sat Mar 18 2000 Jeff Johnson <jbj@redhat.com>
- update to (tcl,tk}-8.2.3, expect-5.31, and itcl-3.1.0, URL's as well.
- use perl to drill out pre-pended RPM_BUILD_ROOT.
- configure with --enable-threads (experimental).
- improved version of autopasswd (#4788).
- autopasswd needs to handle password starting with hyphen (#9917).
- handle 553 ftp status in rftp expect script (#7869).
- remove cryptdir/decryptdir, as Linux has not crypt command (#6668).
- correct hierarchy spelling (#7082).
- fix "expect -d ...", format string had int printed as string (#7775).

* Tue Mar  7 2000 Jeff Johnson <jbj@redhat.com>
- rebuild for sparc baud rates > 38400.

* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
- handle compressed manpages

* Thu Feb 03 2000 Elliot Lee <sopwith@redhat.com>
- Make changes from bug number 7602
- Apply patch from bug number 7537
- Apply fix from bug number 7157
- Add fixes from bug #7601 to the runtcl patch

* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
- fix descriptions
- man pages are compressed (whatapain)

* Tue Nov 30 1999 Jakub Jelinek <jakub@redhat.com>
- fix tclX symlinks.
- compile on systems where SIGPWR == SIGLOST.

* Sat May  1 1999 Jeff Johnson <jbj@redhat.com>
- update tcl/tk to 8.0.5.
- avoid "containing" in Tix (#2332).

* Thu Apr  8 1999 Jeff Johnson <jbj@redhat.com>
- use /usr/bin/write in kibitz (#1320).
- use cirrus.sprl.umich.edu in weather (#1926).

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 28)

* Mon Mar 08 1999 Preston Brown <pbrown@redhat.com>
- whoops, exec-prefix for itcl was set to '/foo', changed to '/usr'.

* Tue Feb 16 1999 Jeff Johnson <jbj@redhat.com>
- expect does unaligned access on alpha (#989)
- upgrade tcl/tk/tclX to 8.0.4
- upgrade expect to 5.28.
- add itcl 3.0.1

* Tue Jan 12 1999 Cristian Gafton <gafton@redhat.com>
- call libtoolize to allow building on the arm
- build for glibc 2.1
- strip binaries

* Thu Sep 10 1998 Jeff Johnson <jbj@redhat.com>
- update tcl/tk/tclX to 8.0.3, expect is updated also.

* Mon Jun 29 1998 Jeff Johnson <jbj@redhat.com>
- expect: mkpasswd needs delay before sending password (problem #576)

* Thu May 07 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Sat May 02 1998 Cristian Gafton <gafton@redhat.com>
- fixed expect binaries exec permissions

* Thu Apr 09 1998 Erik Troan <ewt@redhat.com>
- updated to Tix 4.1.0.006
- updated version numbers of tcl/tk to relflect includsion of p2

* Wed Mar 25 1998 Cristian Gafton <gafton@redhat.com>
- updated tcl/tk to patch level 2
- updated tclX to 8.0.2

* Thu Oct 30 1997 Otto Hammersmith <otto@redhat.com>
- fixed filelist for tix... replacing path to the expect binary in scripts
  was leaving junk files around.

* Wed Oct 22 1997 Otto Hammersmith <otto@redhat.com>
- added patch to remove libieee test in configure.in for tcl and tk.
  Shoudln't be needed anymore for glibc systems, but this isn't the "proper" 
  solution for all systems
- fixed src urls

* Mon Oct 06 1997 Erik Troan <ewt@redhat.com>
- removed version numbers from descriptions

* Mon Sep 22 1997 Erik Troan <ewt@redhat.com>
- updated to tcl/tk 8.0 and related versions of packages

* Tue Jun 17 1997 Erik Troan <ewt@redhat.com>
- built against glibc
- fixed dangling tclx/tkx symlinks
