Name: tcl-pgtcl
Version: 2.0.0
Release: 5%{?dist}
Summary: A Tcl client library for PostgreSQL
Group: Applications/Databases
URL: http://sourceforge.net/projects/pgtclng/
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
# recognizes it as an independent license, so we do as well.
License: PostgreSQL
Source0: http://downloads.sourceforge.net/pgtclng/pgtcl%{version}.tar.gz
# Note that for some reason docs are date-labeled not version-labeled
Source1: http://downloads.sourceforge.net/pgtclng/pgtcldocs-20110918.zip
Patch1: pgtcl-no-rpath.patch
Provides: pgtcl = %{version}-%{release}
# pgtcl was originally shipped as a sub-RPM of the PostgreSQL package;
# these Provides/Obsoletes give a migration path. Note there is no
# intention of changing the version numbers in future.
Provides: postgresql-tcl = 8.5.0-1
Obsoletes: postgresql-tcl < 8.5
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: postgresql-devel tcl-devel
BuildRequires: autoconf
Requires: tcl(abi) >= 8.5
%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
%description
PostgreSQL is an advanced Object-Relational database management system.
The tcl-pgtcl package contains Pgtcl, a Tcl client library for connecting
to a PostgreSQL server.
%prep
%setup -q -n pgtcl%{version}
unzip %{SOURCE1}
PGTCLDOCDIR=`basename %{SOURCE1} .zip`
mv $PGTCLDOCDIR Pgtcl-docs
%patch1 -p1
autoconf
%build
%configure --libdir=%{tcl_sitearch} --with-tcl=%{_libdir}
# note: as of pgtcl 1.5.2, its makefile is not parallel-safe
make all
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# we don't really need to ship the .h file
rm -f $RPM_BUILD_ROOT%{_includedir}/libpgtcl.h
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_libdir}/tcl%{tcl_version}/pgtcl%{version}/
%doc Pgtcl-docs/*
%changelog
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.0.0-5
- Mass rebuild 2014-01-24
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.0.0-4
- Mass rebuild 2013-12-27
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sun Feb 5 2012 Tom Lane <tgl@redhat.com> 2.0.0-1
- Update to pgtcl 2.0.0
- Update URLs to reference new project site at sourceforge
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Dec 29 2010 Tom Lane <tgl@redhat.com> 1.8.0-1
- Update to pgtcl 1.8.0.
- Relabel license as PostgreSQL now that that's separately recognized by OSI.
* Thu Jan 21 2010 Tom Lane <tgl@redhat.com> 1.6.2-3
- Correct Source: tags and comment to reflect how to get the tarball.
* Tue Nov 24 2009 Tom Lane <tgl@redhat.com> 1.6.2-2
- Fix License tag as per discussion in PyGreSQL package review request.
Related: #452321
* Fri Jun 20 2008 Tom Lane <tgl@redhat.com> 1.6.2-1
- Created package by stripping down postgresql specfile and adjusting
to meet current packaging guidelines for Tcl extensions.