1# $Id$
2# This file is the basis for a binary Tk Linux RPM.
3
4%{!?directory:%define directory /usr/local}
5
6Name:          tk
7Summary:       Tk graphical toolkit for the Tcl scripting language.
8Version:       8.5.9
9Release:       2
10License:       BSD
11Group:         Development/Languages
12Source:        http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz
13URL:           http://www.tcl.tk/
14Buildroot:     /var/tmp/%{name}%{version}
15Buildrequires: XFree86-devel tcl >= 8.5.0
16Requires:      tcl >= 8.5.0
17
18%description
19The Tcl (Tool Command Language) provides a powerful platform for
20creating integration applications that tie together diverse
21applications, protocols, devices, and frameworks.  When paired with
22the Tk toolkit, Tcl provides the fastest and most powerful way to
23create GUI applications that run on PCs, Unix, and Mac OS X.  Tcl
24can also be used for a variety of web-related tasks and for creating
25powerful command languages for applications.
26
27%prep
28%setup -q -n %{name}%{version}
29
30%build
31cd unix
32CFLAGS="%optflags" ./configure \
33	--prefix=%{directory} \
34	--exec-prefix=%{directory} \
35	--libdir=%{directory}/%{_lib}
36make 
37
38%install
39cd unix
40make INSTALL_ROOT=%buildroot install
41
42%clean
43rm -rf %buildroot
44
45%files -n tk
46%defattr(-,root,root)
47%if %{_lib} != lib
48%{directory}/%{_lib}
49%endif
50%{directory}/lib
51%{directory}/bin
52%{directory}/include
53%{directory}/man/man1
54%{directory}/man/man3
55%{directory}/man/mann
56