%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}} %define real_name mysqltcl Name: tcl-%{real_name} Version: 3.05 Release: 1%{?dist} Summary: MySQL interface for TCL Group: Development/Languages License: BSD URL: http://www.xdobry.de/mysqltcl/ Source0: http://www.xdobry.de/mysqltcl/%{real_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: tcl >= 8.3.1 BuildRequires: tcl-devel BuildRequires: mysql-devel Requires: tcl >= 8.3.1 mysql Provides: mysqltcl = %{version}-%{release} %description mysqltcl is an extension to the Tool Command Language (Tcl) that provides high-level access to a MySQL database server. %prep %setup -q -n %{real_name}-%{version} %build # Configure tends to pick the 32-bit libraries in multiarch environments so we # tell it what to do. %configure \ --libdir=%{tcl_sitearch} \ --with-tcl=%{_libdir} \ --with-mysql-lib=%{_libdir}/mysql \ %ifarch x86_64 ppc64 amd64 sparc64 --enable-64bit %else %endif %{__make} %{?_smp_mflags} %install %{__rm} -rf %{buildroot} %{__make} install DESTDIR=%{buildroot} INSTALL="%{__install} -c -p" \ PKG_DIR="%{real_name}%{version}" %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) %doc README ChangeLog COPYING AUTHORS %{tcl_sitearch}/%{real_name}%{version} %{_mandir}/man?/* %changelog * Wed Mar 23 2009 Ray Van Dolson - 3.05-1 - Initial creation