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