summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmax <rmax>2006-03-23 16:48:20 (GMT)
committerrmax <rmax>2006-03-23 16:48:20 (GMT)
commit974ca423b7a97eedb0a45b650854594838358b84 (patch)
tree53c96f255b3d29ed2e69cdc371c6dc97d7d68d1d
parent9af3d72a02069524146c46aff54e5d1a93aef7ae (diff)
downloadtk-974ca423b7a97eedb0a45b650854594838358b84.zip
tk-974ca423b7a97eedb0a45b650854594838358b84.tar.gz
tk-974ca423b7a97eedb0a45b650854594838358b84.tar.bz2
* unix/tk.spec: Cleaned up and completed the spec file.
An RPM can now be built from the tk source distribution with "rpmbuild -tb <tarball>".
-rw-r--r--ChangeLog6
-rw-r--r--unix/tk.spec59
2 files changed, 37 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index ceb2d7c..bf265f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-23 Reinhard Max <max@suse.de>
+
+ * unix/tk.spec: Cleaned up and completed the spec file.
+ An RPM can now be built from the tk source
+ distribution with "rpmbuild -tb <tarball>".
+
2006-03-23 Don Porter <dgp@users.sourceforge.net>
* tests/textDisp.test: Updated expected error messages to match the
diff --git a/unix/tk.spec b/unix/tk.spec
index dc9b873..bd5d9b7 100644
--- a/unix/tk.spec
+++ b/unix/tk.spec
@@ -1,20 +1,19 @@
-# $Id: tk.spec,v 1.21 2005/06/07 14:20:18 dkf Exp $
+# $Id: tk.spec,v 1.22 2006/03/23 16:48:21 rmax Exp $
# This file is the basis for a binary Tk Linux RPM.
-%define version 8.5a4
-%define directory /usr/local
-
-Summary: Tk graphical toolkit for the Tcl scripting language.
-Name: tk
-Version: %{version}
-Release: 1
-Copyright: BSD
-Group: Development/Languages
-Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz
-URL: http://www.tcl.tk/
-Packager: Carina
-Buildroot: /var/tmp/%{name}%{version}
-Requires: XFree86-libs >= 3.3.3, XFree86-devel >= 3.3.3, tcl = 8.5a4
+%{!?directory:%define directory /usr/local}
+
+Name: tk
+Summary: Tk graphical toolkit for the Tcl scripting language.
+Version: 8.5a4
+Release: 2
+License: BSD
+Group: Development/Languages
+Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz
+URL: http://www.tcl.tk/
+Buildroot: /var/tmp/%{name}%{version}
+Buildrequires: XFree86-devel tcl = %version
+Requires: tcl = %version
%description
The Tcl (Tool Command Language) provides a powerful platform for
@@ -26,27 +25,31 @@ can also be used for a variety of web-related tasks and for creating
powerful command languages for applications.
%prep
+%setup -q -n %{name}%{version}
%build
-./configure --prefix %{directory} --exec-prefix %{directory}
-make CFLAGS=$RPM_OPT_FLAGS
+cd unix
+CFLAGS="%optflags" ./configure \
+ --prefix=%{directory} \
+ --exec-prefix=%{directory} \
+ --libdir=%{directory}/%{_lib}
+make
%install
-rm -rf $RPM_BUILD_ROOT
-make INSTALL_ROOT=$RPM_BUILD_ROOT install
+cd unix
+make INSTALL_ROOT=%buildroot install
%clean
-rm -rf $RPM_BUILD_ROOT
-
-# to create the tcl files list, comment out tk in the install section above,
-# then run "rpm -bi" then do a find from the build root directory,
-# and remove the files in specific directories which suffice by themselves,
-# then to create the files list for tk, uncomment tk, comment out tcl,
-# then rm -rf $RPM_BUILD_ROOT then rpm --short-circuit -bi then redo a find,
-# and remove the files in specific directories which suffice by themselves.
+rm -rf %buildroot
+
%files -n tk
%defattr(-,root,root)
+%if %{_lib} != lib
+%{directory}/%{_lib}
+%endif
%{directory}/lib
%{directory}/bin
%{directory}/include
-%{directory}/man
+%{directory}/man/man1
+%{directory}/man/man3
+%{directory}/man/mann