# $Id: tclpython.spec,v 1.14 2003/12/24 11:23:10 jfontain Exp $ # retain only major and minor version: "Python 2.2.3" gives 2.2 %define pythonversion %(python -V 2>&1 | cut -d ' ' -f 2 | cut -d . -f 1,2) Summary: Embedded Python interpreters package for Tcl Name: tclpython Version: 3.1 Release: 0.fdr.1 Epoch: 0 License: GPL Group: Development/Languages Source: http://jfontain.free.fr/tclpython-3.1.tar.gz URL: http://jfontain.free.fr/ Packager: Jean-Luc Fontaine Requires: tcl >= 0:8.3.3, python >= 0:%pythonversion BuildRequires: %_includedir/tcl.h, python-devel >= 0:%pythonversion BuildRoot: %_tmppath/%name-%version-%release-root-%(%__id_u -n) %description Allows the evaluation or execution of Python code from a Tcl interpreter, by creating one or several embedded Python interpreters from the Tcl interpreter. %prep %setup -q %build cc -shared $RPM_OPT_FLAGS -s -o %name.so.%version -fPIC -DUSE_TCL_STUBS -I%_includedir/python%pythonversion %name.c %_libdir/libtclstub`echo 'puts $tcl_version' | %_bindir/tclsh`.a -L%_libdir/python%pythonversion/config -lpython%pythonversion -lpthread -lutil %install DIRECTORY=$RPM_BUILD_ROOT%_libdir/%name-%version mkdir -p $DIRECTORY echo 'package ifneeded %name %version "load [file join $dir %name.so.%version]"' > $DIRECTORY/pkgIndex.tcl cp -p %name.so.%version $DIRECTORY %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README CHANGES %name.htm %_libdir/%name-%version %changelog * Tue Dec 24 2003 Jean-Luc Fontaine 0:3.1-0.fdr.1 - first Fedora Core 1 compatible package