From 7b20cff4bc0b8c9532fc41f5a9fdb99a004520c5 Mon Sep 17 00:00:00 2001
From: "John K. Harvey" <john.harvey@crunchydata.com>
Date: Wed, 10 Feb 2016 10:59:14 -0500
Subject: [PATCH] fix ln issue in pgjdbc

---
 rpm/redhat/9.5/postgresql-jdbc/EL-6/postgresql-jdbc.spec | 6 +++---
 rpm/redhat/9.5/postgresql-jdbc/EL-7/postgresql-jdbc.spec | 6 +++---
 rpm/redhat/9.5/postgresql-jdbc/F-22/postgresql-jdbc.spec | 6 +++---
 rpm/redhat/9.5/postgresql-jdbc/F-23/postgresql-jdbc.spec | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/rpm/redhat/9.5/postgresql-jdbc/EL-6/postgresql-jdbc.spec b/rpm/redhat/9.5/postgresql-jdbc/EL-6/postgresql-jdbc.spec
index cc0dc48..ab25cb1 100644
--- a/rpm/redhat/9.5/postgresql-jdbc/EL-6/postgresql-jdbc.spec
+++ b/rpm/redhat/9.5/postgresql-jdbc/EL-6/postgresql-jdbc.spec
@@ -72,9 +72,9 @@ mvn -DskipTests -P release-artifacts clean package
 pushd %{buildroot}%{_javadir}
 # Also, for backwards compatibility with our old postgresql-jdbc packages,
 # add these symlinks.  (Probably only the jdbc3 symlink really makes sense?)
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc2.jar
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc2ee.jar
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc3.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc2.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc2ee.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc3.jar
 popd
 
 # Install the pom after inserting the correct version number
diff --git a/rpm/redhat/9.5/postgresql-jdbc/EL-7/postgresql-jdbc.spec b/rpm/redhat/9.5/postgresql-jdbc/EL-7/postgresql-jdbc.spec
index cc0dc48..ab25cb1 100644
--- a/rpm/redhat/9.5/postgresql-jdbc/EL-7/postgresql-jdbc.spec
+++ b/rpm/redhat/9.5/postgresql-jdbc/EL-7/postgresql-jdbc.spec
@@ -72,9 +72,9 @@ mvn -DskipTests -P release-artifacts clean package
 pushd %{buildroot}%{_javadir}
 # Also, for backwards compatibility with our old postgresql-jdbc packages,
 # add these symlinks.  (Probably only the jdbc3 symlink really makes sense?)
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc2.jar
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc2ee.jar
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc3.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc2.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc2ee.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc3.jar
 popd
 
 # Install the pom after inserting the correct version number
diff --git a/rpm/redhat/9.5/postgresql-jdbc/F-22/postgresql-jdbc.spec b/rpm/redhat/9.5/postgresql-jdbc/F-22/postgresql-jdbc.spec
index cc0dc48..ab25cb1 100644
--- a/rpm/redhat/9.5/postgresql-jdbc/F-22/postgresql-jdbc.spec
+++ b/rpm/redhat/9.5/postgresql-jdbc/F-22/postgresql-jdbc.spec
@@ -72,9 +72,9 @@ mvn -DskipTests -P release-artifacts clean package
 pushd %{buildroot}%{_javadir}
 # Also, for backwards compatibility with our old postgresql-jdbc packages,
 # add these symlinks.  (Probably only the jdbc3 symlink really makes sense?)
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc2.jar
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc2ee.jar
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc3.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc2.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc2ee.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc3.jar
 popd
 
 # Install the pom after inserting the correct version number
diff --git a/rpm/redhat/9.5/postgresql-jdbc/F-23/postgresql-jdbc.spec b/rpm/redhat/9.5/postgresql-jdbc/F-23/postgresql-jdbc.spec
index cc0dc48..ab25cb1 100644
--- a/rpm/redhat/9.5/postgresql-jdbc/F-23/postgresql-jdbc.spec
+++ b/rpm/redhat/9.5/postgresql-jdbc/F-23/postgresql-jdbc.spec
@@ -72,9 +72,9 @@ mvn -DskipTests -P release-artifacts clean package
 pushd %{buildroot}%{_javadir}
 # Also, for backwards compatibility with our old postgresql-jdbc packages,
 # add these symlinks.  (Probably only the jdbc3 symlink really makes sense?)
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc2.jar
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc2ee.jar
-%{__ln_s} postgresql-jdbc.jar postgresql-jdbc3.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc2.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc2ee.jar
+%{__ln_s} postgresql%{pgmajorversion}-jdbc.jar postgresql-jdbc3.jar
 popd
 
 # Install the pom after inserting the correct version number
-- 
2.5.0

