File mysqltcl.spec of Package mysqltcl

#
# spec file for package mysqltcl
#
# Copyright (c) 2017 A. Ayala 
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Summary:         MySQL interface for Tcl
Name:            mysqltcl
Version:         3.052
Release:         0
License:         BSD-2-Clause
Group:           Development/Languages/Tcl
Source:          http://www.xdobry.de/mysqltcl/%{name}-%{version}.tar.gz
# Source1:         baselibs.conf
URL:             http://www.xdobry.de/mysqltcl
Requires:        mysql
Requires:        tcl >= 8.3.1
#Requires:        libmysqlclient
BuildRequires:   libmysqlclient-devel
BuildRequires:   tcl-devel
BuildRequires:   tcl >= 8.3.1
Buildroot:       %_tmppath/%{name}-%{version}-root

%define tclscriptdir %{_libdir}/tcl
%define targetdir %tclscriptdir/%{name}-%{version}


%description
Mysqltcl is an extension to the Tool Command Language (Tcl) that
provides high-level access to a MySQL database server.

%prep
%setup -q
%__chmod a-x ChangeLog

%build
%ifarch x86_64
  CONFIGURE_ARGS="--with-tcl=%{_libdir} --enable-64bit"
%endif

%if 0%{?suse_version}
  CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-mysql-lib=%{_libdir}"
%else
  CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-mysql-lib=/usr/%{_lib}/mysql"
%endif

CFLAGS="%optflags" %configure ${CONFIGURE_ARGS}
make

%install
%make_install pkglibdir=%targetdir

%__strip %buildroot/%targetdir/lib%{name}%{version}.so

# For some starnge reason pkgIndex.tcl is not copied
%__cp pkgIndex.tcl %buildroot/%targetdir/


%files
%defattr (-,root,root,0755)
%doc README ChangeLog COPYING AUTHORS
%dir %targetdir
%targetdir/pkgIndex.tcl
%targetdir/lib%{name}%{version}.so
%_mandir/mann/%{name}.n.gz


%changelog
# Version 3.052
* Sun Feb 22 2015 Richard Bos <rbos@opensuse.org> - 3.052
- Upgraded to version 3.052
# Version 3.05
* Fri Feb 05 2010 Richard Bos <rbos@opensuse.org> - 3.05
- Correct library and pkgIndex.tcl file location
* Thu Feb 04 2010 Richard Bos <rbos@opensuse.org> - 3.05
- Initial openSUSE version for the build servcice
* Sat Apr 5 2008 Artur Trzewik
- applied path from Björn König to support compilation with mysql3.20 (with help of #if)
- some addaption and bug fixes for mysql 5 for handling mutiple result queries. In case of mustiple statement mysql::exec
# Version 3.04
* Mon Feb 11 2008 Artur Trzewik
- bug in mysql::state fixed thanks to snyper for bug fix
# Version 3.03
* Wed Apr 25 2007 Artur Trzewik
- patch tp adapt mysql column comands for mysql5 was applied. This accept new columns types: newdecimal, bit and geometry. Thanks to Joerg Mehring.
# Version 3.02
* Fri Apr 14 2006 Artur Trzewik
- bug in mysql::map and mysql::recieve removed (occurs only for one column evalated in global context)
- TEA upgrated
# Version 3.01
* Mon Dec 27 2004 Artur Trzewik
- bug in mysql::nextresult fixed
- bug in man format doc fixed
- new command mysql::encoding
- new ssl connection options -sslkey -sslcert -sslca -sslcapath -sslciphers 
using of mysql_ssl_set
- new command option mysq::info state
- removed c-header installation section from Makefile.in
# Version 3.00
* Mon Dec 16 2004 Artur Trzewik
- all comands are defined in ::mysql namespace 
- commands are renamed after pattern mysqlconnect mysql::connect
- needs mysql 4.1 or higher
- mysqlnext was renamed to mysql::fetch
- new commands in mysql namespace: autocommit, commit, rollback, nextresult, 
moreresult, warningcoumt, isnull, newnull, setserveroption, shutdown
- new connection options: -multistatement, -multiresult, -localfiles, -foundrows, 
-interactive
- special null handling. The DB null is returned as new special Tcl type
- man pages defined with tcllib doctools
# Version 2.51
* Mon Nov 01 2004 Artur Trzewik
- new command mysqlreceive
- mysqlsel with option -list and -flatlist uses mysql_use_result (from mysql C-API)
# Version 2.50
* Tue Mar 02 2004 Artur Trzewik
- bug in handle managment by subinterpreters was removed by refactoring
# Version 2.41
* Thu Feb 18 2004 Artur Trzewik
- resistant again bug in mysql
- updates in documentation (README file and manual)
- configure script checks also directory /usr/lib for libmysqlclient library
# Version 2.40
* Thu Aug 26 2003 Artur Trzewik
- mysqltcl is now thread safe. The hashtable is hold separated for each thread
# Version 2.31
* Mon Aug 25 2003 Artur Trzewik
- bug in mysqlescape $handle $string fixed (Thanks to Olav Vitters)
# Version 2.30
* Sun Jul 13 2003 Artur Trzewik
- new connection options -ssl -odbc -noschema -compress
- mysqlescape can take also handle as argument to use mysql_real_escape_string and respect character setting
- new command mysqlbaseinfo -connectparameters | -clientversion that return all suported connect parameters or version of client C-API library
- new command mysqlping for checking and refresh of connection
- new command mysqlchangeuser for change user and database
# Version 2.20
* Sun Jun 1 2003 Artur Trzewik
 - mysqlconnect was extended with option -encoding. Similar behavior to fconfigure. (initial patch written by Alexander Schoepe). The Version is not full compatible with oldier version. The differences are be reading date from mysql. Now the date are converted from External to Utf. See documentation for more information.
# Version 2.14
* Thu Apr 17 2003 Artur Trzewik
 - configuration has new future for static linking with mysqlclient library
# Version 2.12
* Sun Feb 23 2003 Artur Trzewik
 - refactoring (options for GetIndexFromObject are defined localy like in Tcl-core)
 - removing unused variables
 - some casts to avoid warnings messages
 - use of Tcl_Preserve and Tcl_Release instead of internal reference count

openSUSE Build Service is sponsored by