diff --git a/.tcl-pgtcl.metadata b/.tcl-pgtcl.metadata new file mode 100644 index 0000000..10d7b56 --- /dev/null +++ b/.tcl-pgtcl.metadata @@ -0,0 +1,2 @@ +17d038100f3b89be9089965699715163255559b7 SOURCES/pgtcl2.0.0.tar.gz +74f26b37d4f080374dae4fd3810ef94db822f36d SOURCES/pgtcldocs-20110918.zip diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/pgtcl-no-rpath.patch b/SOURCES/pgtcl-no-rpath.patch new file mode 100644 index 0000000..b29b78c --- /dev/null +++ b/SOURCES/pgtcl-no-rpath.patch @@ -0,0 +1,33 @@ +This patch prevents use of rpath, which isn't wanted on Fedora. + +Also, tweak Makefile.in to ensure that the -L switch for libpq appears +before any -L for the Tcl libraries during the link. This prevents the +generated library from being bound to the wrong version of libpq when +building on a machine that has an older version of libpq already installed +(bug #166665). + + +diff -Naur pgtcl1.5.3.orig/Makefile.in pgtcl1.5.3/Makefile.in +--- pgtcl1.5.3.orig/Makefile.in 2006-09-09 21:59:59.000000000 -0400 ++++ pgtcl1.5.3/Makefile.in 2007-01-10 18:58:19.000000000 -0500 +@@ -101,7 +101,7 @@ + RANLIB_STUB = @RANLIB_STUB@ + SHLIB_CFLAGS = @SHLIB_CFLAGS@ + SHLIB_LD = @SHLIB_LD@ +-SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ $(PG_LIBS) $(TCL_LIBS) ++SHLIB_LD_LIBS = $(PG_LIBS) @SHLIB_LD_LIBS@ $(TCL_LIBS) + STLIB_LD = @STLIB_LD@ + #TCL_DEFS = @TCL_DEFS@ + TCL_BIN_DIR = @TCL_BIN_DIR@ +diff -Naur pgtcl1.5.3.orig/aclocal.m4 pgtcl1.5.3/aclocal.m4 +--- pgtcl1.5.3.orig/aclocal.m4 2006-09-09 20:27:09.000000000 -0400 ++++ pgtcl1.5.3/aclocal.m4 2007-01-10 18:56:46.000000000 -0500 +@@ -844,7 +844,7 @@ + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" +- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR},-rpath,${LIB_PGTCL_RUNTIME_DIR}' ++ CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + if test "`uname -m`" = "alpha" ; then + CFLAGS="$CFLAGS -mieee" diff --git a/SPECS/tcl-pgtcl.spec b/SPECS/tcl-pgtcl.spec new file mode 100644 index 0000000..f030da1 --- /dev/null +++ b/SPECS/tcl-pgtcl.spec @@ -0,0 +1,103 @@ +Name: tcl-pgtcl +Version: 2.0.0 +Release: 3%{?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 Feb 15 2013 Fedora Release Engineering - 2.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 2.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun Feb 5 2012 Tom Lane 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 - 1.8.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 1.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Dec 29 2010 Tom Lane 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 1.6.2-3 +- Correct Source: tags and comment to reflect how to get the tarball. + +* Tue Nov 24 2009 Tom Lane 1.6.2-2 +- Fix License tag as per discussion in PyGreSQL package review request. +Related: #452321 + +* Fri Jun 20 2008 Tom Lane 1.6.2-1 +- Created package by stripping down postgresql specfile and adjusting + to meet current packaging guidelines for Tcl extensions.