# $Id: tclpython2.spec,v 1.3 2001/03/17 15:16:14 jfontain Exp $ %define version 2.0.1 %define directory /usr %define pythonversion 2.0 Summary: Embedded Python interpreters package for Tcl Name: tclpython2 Version: %{version} Release: 1 Copyright: GPL Group: Development/Languages Source: http://jfontain.free.fr/tclpython-%{version}.tar.gz URL: http://jfontain.free.fr/ Packager: Jean-Luc Fontaine Requires: tcl >= 8.3.1, python2 >= %{pythonversion} BuildRequires: python2-devel >= %{pythonversion} Buildroot: /var/tmp/%{name}-%{version} %description Allows the execution of Python code from a Tcl interpreter, by creating one embedded Python interpreters from the Tcl interpreter. Note: this version allows only a single existing Python interpreter at a time. %prep %setup -q -c %build cd tclpython-%{version} cc -shared -o tclpython.so.%{version} -fPIC -O2 -Wall -I/usr/include/python%{pythonversion} tclpython.c -L/usr/lib/python%{pythonversion}/config -lpython%{pythonversion} -lpthread -ldb1 -lutil strip tclpython.so.%{version} %install cd tclpython-%{version} DIRECTORY=$RPM_BUILD_ROOT%{directory}/lib/%{name}-%{version} mkdir -p $DIRECTORY echo 'package ifneeded %{name} %{version} "load [file join $dir tclpython.so.%{version}]"' > $DIRECTORY/pkgIndex.tcl cp tclpython.so.%{version} $DIRECTORY cp README CHANGES TODO tclpython.htm .. %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README CHANGES TODO tclpython.htm %{directory}/lib/%{name}-%{version}