233054
# Copyright (c) 2000-2005, JPackage Project
233054
# All rights reserved.
233054
#
233054
# Redistribution and use in source and binary forms, with or without
233054
# modification, are permitted provided that the following conditions
233054
# are met:
233054
#
233054
# 1. Redistributions of source code must retain the above copyright
233054
#    notice, this list of conditions and the following disclaimer.
233054
# 2. Redistributions in binary form must reproduce the above copyright
233054
#    notice, this list of conditions and the following disclaimer in the
233054
#    documentation and/or other materials provided with the
233054
#    distribution.
233054
# 3. Neither the name of the JPackage Project nor the names of its
233054
#    contributors may be used to endorse or promote products derived
233054
#    from this software without specific prior written permission.
233054
#
233054
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
233054
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
233054
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
233054
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
233054
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
233054
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
233054
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
233054
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
233054
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
233054
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
233054
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
233054
#
233054
233054
%global section		devel
233054
%global upstreamver	9.2-1002
233054
233054
Summary:	JDBC driver for PostgreSQL
233054
Name:		postgresql-jdbc
233054
Version:	9.2.1002
233054
Release:	6%{?dist}
233054
# ASL 2.0 applies only to postgresql-jdbc.pom file, the rest is BSD
233054
License:	BSD and ASL 2.0
233054
Group:		Applications/Databases
233054
URL:		http://jdbc.postgresql.org/
233054
233054
Source0:	http://jdbc.postgresql.org/download/%{name}-%{upstreamver}.src.tar.gz
233054
# originally http://repo2.maven.org/maven2/postgresql/postgresql/8.4-701.jdbc4/postgresql-8.4-701.jdbc4.pom:
233054
Source1:	%{name}.pom
233054
233054
# patches are self-documented inside the files
233054
Patch1:		postgresql-jdbc-9.2.1002-version-compare.patch
233054
Patch2:		postgresql-jdbc-9.2.1002-getIndexInfo-and-9.6-server.patch
233054
233054
BuildArch:	noarch
233054
BuildRequires:	java-devel
233054
BuildRequires:	jpackage-utils
233054
BuildRequires:	ant
233054
BuildRequires:	ant-junit
233054
BuildRequires:	junit
233054
# gettext is only needed if we try to update translations
233054
#BuildRequires:	gettext
233054
Requires:	java-headless
233054
Requires:	jpackage-utils
233054
233054
%description
233054
PostgreSQL is an advanced Object-Relational database management
233054
system. The postgresql-jdbc package includes the .jar files needed for
233054
Java programs to access a PostgreSQL database.
233054
233054
%package javadoc
233054
Summary:        API docs for %{name}
233054
Group:          Documentation
233054
233054
%description javadoc
233054
This package contains the API Documentation for %{name}.
233054
233054
%prep
233054
%setup -c -q
233054
mv -f %{name}-%{upstreamver}.src/* .
233054
rm -f %{name}-%{upstreamver}.src/.gitignore
233054
rmdir %{name}-%{upstreamver}.src
233054
233054
%patch1 -p1 -b .version
233054
%patch2 -p1 -b .getIndexInfo
233054
233054
# remove any binary libs
233054
find -name "*.jar" -or -name "*.class" | xargs rm -f
233054
233054
%build
233054
export OPT_JAR_LIST="ant/ant-junit junit"
233054
export CLASSPATH=
233054
233054
# Ideally we would run "sh update-translations.sh" here, but that results
233054
# in inserting the build timestamp into the generated messages_*.class
233054
# files, which makes rpmdiff complain about multilib conflicts if the
233054
# different platforms don't build in the same minute.  For now, rely on
233054
# upstream to have updated the translations files before packaging.
233054
233054
ant jar publicapi
233054
233054
%install
233054
install -d $RPM_BUILD_ROOT%{_javadir}
233054
# Per jpp conventions, jars have version-numbered names and we add
233054
# versionless symlinks.
233054
install -m 644 jars/postgresql.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
233054
233054
pushd $RPM_BUILD_ROOT%{_javadir}
233054
# Also, for backwards compatibility with our old postgresql-jdbc packages,
233054
# add these symlinks.  (Probably only the jdbc3 symlink really makes sense?)
233054
ln -s postgresql-jdbc.jar postgresql-jdbc2.jar
233054
ln -s postgresql-jdbc.jar postgresql-jdbc2ee.jar
233054
ln -s postgresql-jdbc.jar postgresql-jdbc3.jar
233054
popd
233054
233054
# Install the pom after inserting the correct version number
233054
sed 's/UPSTREAM_VERSION/%{upstreamver}/g' %{SOURCE1} >JPP-%{name}.pom
233054
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}/
233054
install -m 644 JPP-%{name}.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
233054
%add_maven_depmap
233054
233054
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
233054
cp -ra build/publicapi $RPM_BUILD_ROOT%{_javadocdir}/%{name}
233054
install -d build/publicapi docs/%{name}
233054
233054
%files -f .mfiles
233054
%doc LICENSE README doc/*
233054
%{_javadir}/%{name}2.jar
233054
%{_javadir}/%{name}2ee.jar
233054
%{_javadir}/%{name}3.jar
233054
233054
%files javadoc
233054
%doc LICENSE
233054
%doc %{_javadocdir}/%{name}
233054
233054
%changelog
233054
* Fri Apr 20 2018 Pavel Raiskup <praiskup@redhat.com> - 9.2.1002-6
233054
- fix incompatibility with 9.6+ (rhbz#1547424)
233054
- it's unnecessary to depend on whole java (rhbz#1406931)
233054
233054
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 9.2.1002-5
233054
- Mass rebuild 2013-12-27
233054
233054
* Tue Aug 06 2013 Pavel Raiskup <praiskup@redhat.com> - 9.2.1002-4
233054
- add javadoc subpackage
233054
233054
* Tue Aug 06 2013 Pavel Raiskup <praiskup@redhat.com> - 9.2.1002-4
233054
- don't use removed macro %%add_to_maven_depmap (#992816)
233054
- lint: trim-lines, reuse %%{name} macro, fedora-review fixes
233054
- merge cleanup changes by Stano Ochotnicky
233054
233054
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.2.1002-3
233054
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
233054
233054
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.2.1002-2
233054
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
233054
233054
* Wed Nov 14 2012 Tom Lane <tgl@redhat.com> 9.2.1002-1
233054
- Update to build 9.2-1002 (just to correct mispackaging of source tarball)
233054
233054
* Tue Nov 13 2012 Tom Lane <tgl@redhat.com> 9.2.1001-1
233054
- Update to build 9.2-1001 for compatibility with PostgreSQL 9.2
233054
233054
* Sun Jul 22 2012 Tom Lane <tgl@redhat.com> 9.1.902-1
233054
- Update to build 9.1-902
233054
233054
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.1.901-4
233054
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
233054
233054
* Thu Feb 23 2012 Tom Lane <tgl@redhat.com> 9.1.901-3
233054
- Change BuildRequires: java-1.6.0-openjdk-devel to just java-devel.
233054
  As of 9.1-901, upstream has support for JDBC4.1, so we don't have to
233054
  restrict to JDK6 anymore, and Fedora is moving to JDK7
233054
Resolves: #796580
233054
233054
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.1.901-2
233054
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
233054
233054
* Mon Sep 12 2011 Tom Lane <tgl@redhat.com> 9.1.901-1
233054
- Update to build 9.1-901 for compatibility with PostgreSQL 9.1
233054
233054
* Mon Aug 15 2011 Tom Lane <tgl@redhat.com> 9.0.801-4
233054
- Add BuildRequires: java-1.6.0-openjdk-devel to ensure we have recent JDK
233054
Related: #730588
233054
- Remove long-obsolete minimum versions from BuildRequires
233054
233054
* Sun Jul 17 2011 Tom Lane <tgl@redhat.com> 9.0.801-3
233054
- Switch to non-GCJ build, since GCJ is now deprecated in Fedora
233054
Resolves: #722247
233054
- Use %%{_mavendepmapfragdir} to fix FTBFS with maven 3
233054
233054
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.0.801-2
233054
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
233054
233054
* Wed Dec 29 2010 Tom Lane <tgl@redhat.com> 9.0.801-1
233054
- Update to build 9.0-801
233054
233054
* Mon May 31 2010 Tom Lane <tgl@redhat.com> 8.4.701-4
233054
- Update gcj_support sections to meet Packaging/GCJGuidelines;
233054
  fixes FTBFS in F-14 rawhide
233054
233054
* Tue Nov 24 2009 Tom Lane <tgl@redhat.com> 8.4.701-3
233054
- Seems the .pom file *must* have a package version number in it, sigh
233054
Resolves: #538487
233054
233054
* Mon Nov 23 2009 Tom Lane <tgl@redhat.com> 8.4.701-2
233054
- Add a .pom file to ease use by maven-based packages (courtesy Deepak Bhole)
233054
Resolves: #538487
233054
233054
* Tue Aug 18 2009 Tom Lane <tgl@redhat.com> 8.4.701-1
233054
- Update to build 8.4-701
233054
233054
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:8.3.603-4
233054
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
233054
233054
* Tue Apr 21 2009 Tom Lane <tgl@redhat.com> 8.3.603-3
233054
- Avoid multilib conflict caused by overeager attempt to rebuild translations
233054
233054
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:8.3.603-2.1
233054
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
233054
233054
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> 8.3.603-1.1
233054
- drop repotag
233054
233054
* Tue Feb 12 2008 Tom Lane <tgl@redhat.com> 8.3.603-1jpp
233054
- Update to build 8.3-603
233054
233054
* Sun Aug 12 2007 Tom Lane <tgl@redhat.com> 8.2.506-1jpp
233054
- Update to build 8.2-506
233054
233054
* Tue Apr 24 2007 Tom Lane <tgl@redhat.com> 8.2.505-1jpp
233054
- Update to build 8.2-505
233054
- Work around 1.4 vs 1.5 versioning inconsistency
233054
233054
* Fri Dec 15 2006 Tom Lane <tgl@redhat.com> 8.2.504-1jpp
233054
- Update to build 8.2-504
233054
233054
* Wed Aug 16 2006 Tom Lane <tgl@redhat.com> 8.1.407-1jpp.4
233054
- Fix Requires: for rebuild-gcj-db (bz #202544)
233054
233054
* Wed Aug 16 2006 Fernando Nasser <fnasser@redhat.com> 8.1.407-1jpp.3
233054
- Merge with upstream
233054
233054
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> 8.1.407-1jpp.2
233054
- Rebuilt
233054
233054
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0:8.1.407-1jpp.1
233054
- rebuild
233054
233054
* Wed Jun 14 2006 Tom Lane <tgl@redhat.com> 8.1.407-1jpp
233054
- Update to build 8.1-407
233054
233054
* Mon Mar 27 2006 Tom Lane <tgl@redhat.com> 8.1.405-2jpp
233054
- Back-patch upstream fix to support unspecified-type strings.
233054
233054
* Thu Feb 16 2006 Tom Lane <tgl@redhat.com> 8.1.405-1jpp
233054
- Split postgresql-jdbc into its own SRPM (at last).
233054
- Build it from source.  Add support for gcj compilation.