From 9ad8c0ea373596e2e63d409efc02cc9876de0bd5 Mon Sep 17 00:00:00 2001 From: Alexander Pyhalov Date: Thu, 23 Feb 2017 00:00:01 +0300 Subject: [PATCH] postgresql-jdbc: update to 42.0.0, ship Java 8 - compatible version --- components/database/postgresql-jdbc/Makefile | 45 +++++++++++++--------- components/database/postgresql-jdbc/history | 1 + .../postgresql-jdbc/patches/01-skip-tests.patch | 10 +++++ .../postgresql-jdbc/postgresql-jdbc.license | 26 ------------- .../{postgresql83-jdbc.p5m => postgresql-jdbc.p5m} | 17 ++++---- 5 files changed, 47 insertions(+), 52 deletions(-) create mode 100644 components/database/postgresql-jdbc/history create mode 100644 components/database/postgresql-jdbc/patches/01-skip-tests.patch delete mode 100644 components/database/postgresql-jdbc/postgresql-jdbc.license rename components/database/postgresql-jdbc/{postgresql83-jdbc.p5m => postgresql-jdbc.p5m} (58%) diff --git a/components/database/postgresql-jdbc/Makefile b/components/database/postgresql-jdbc/Makefile index 9a9153054..d977a2f8d 100644 --- a/components/database/postgresql-jdbc/Makefile +++ b/components/database/postgresql-jdbc/Makefile @@ -10,33 +10,42 @@ # # -# Copyright 2013 Alexander Pyhalov. All rights reserved. +# Copyright 2017 Alexander Pyhalov. All rights reserved. # include ../../../make-rules/shared-macros.mk -COMPONENT_NAME= postgresql-jdbc - -COMPONENT_VERSION= 9.2-1003 -COMPONENT_REVISION= 1 -IPS_COMPONENT_VERSION= 9.2.1003 -COMPONENT_SUMMARY=JDBC driver for PostgreSQL -COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION).src -COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz +COMPONENT_NAME= postgresql-jdbc +COMPONENT_VERSION= 42.0.0 +COMPONENT_SUMMARY= JDBC driver for PostgreSQL +COMPONENT_SRC= $(COMPONENT_NAME)-42.0-0.src +COMPONENT_ARCHIVE= $(COMPONENT_NAME)-$(COMPONENT_VERSION).src.tar.gz COMPONENT_ARCHIVE_HASH= \ - sha256:d61449b8a17ce540b26437382c33a59a49a94c578c943fccf91139ee06478968 + sha256:99eaa62b49c9ef2be6ad6509fbb3ca8d00e7da6da414cfef574763555b77e1e4 COMPONENT_ARCHIVE_URL= \ http://jdbc.postgresql.org/download/$(COMPONENT_ARCHIVE) -COMPONENT_PROJECT_URL = http://jdbc.postgresql.org/ +COMPONENT_PROJECT_URL= http://jdbc.postgresql.org/ +COMPONENT_FMRI= database/postgres/connector/jdbc +COMPONENT_CLASSIFICATION= System/Databases +COMPONENT_LICENSE= BSD +COMPONENT_LICENSE_FILE= LICENSE + +include $(WS_MAKE_RULES)/prep.mk +include $(WS_MAKE_RULES)/justmake.mk +include $(WS_MAKE_RULES)/ips.mk + +COMPONENT_BUILD_ENV += JAVA_HOME=$(JAVA_HOME) -include $(WS_TOP)/make-rules/prep.mk -include $(WS_TOP)/make-rules/ant.mk -include $(WS_TOP)/make-rules/ips.mk +COMPONENT_BUILD_ACTION = cd $(@D); $(ENV) $(COMPONENT_BUILD_ENV) \ + mvn install + +COMPONENT_INSTALL_ACTION = $(MKDIR) -p $(PROTO_DIR)/usr/postgres/jdbc && \ + $(CP) $(BUILD_DIR_32)/pgjdbc/target/postgresql-*.jar $(PROTO_DIR)/usr/postgres/jdbc/postgresql-jdbc4.jar -COMPONENT_BUILD_ARGS = build: $(BUILD_32) -install: $(BUILD_32) - $(MKDIR) -p $(PROTO_DIR)/usr/postgres/jdbc && \ - $(CP) $(BUILD_DIR_32)/jars/postgresql.jar $(PROTO_DIR)/usr/postgres/jdbc/postgresql-jdbc4.jar +install: $(INSTALL_32) + +REQUIRED_PACKAGES += developer/build/maven +REQUIRED_PACKAGES += developer/java/openjdk8 diff --git a/components/database/postgresql-jdbc/history b/components/database/postgresql-jdbc/history new file mode 100644 index 000000000..31e6f09fc --- /dev/null +++ b/components/database/postgresql-jdbc/history @@ -0,0 +1 @@ +database/postgres-83/connector/jdbc@8.3.603,5.11-2015.0.2.0 database/postgres/connector/jdbc diff --git a/components/database/postgresql-jdbc/patches/01-skip-tests.patch b/components/database/postgresql-jdbc/patches/01-skip-tests.patch new file mode 100644 index 000000000..c134d789c --- /dev/null +++ b/components/database/postgresql-jdbc/patches/01-skip-tests.patch @@ -0,0 +1,10 @@ +Tests require running PostgreSQL server +--- postgresql-jdbc-42.0-0.src/pgjdbc/pom.xml 2017-02-22 23:22:01.098183006 +0300 ++++ postgresql-jdbc-42.0-0.src/pgjdbc/pom.xml 2017-02-22 23:21:52.652374685 +0300 +@@ -33,6 +33,7 @@ + 4.2 + 42 + false ++ true + 7.4 + diff --git a/components/database/postgresql-jdbc/postgresql-jdbc.license b/components/database/postgresql-jdbc/postgresql-jdbc.license deleted file mode 100644 index fd416d2ec..000000000 --- a/components/database/postgresql-jdbc/postgresql-jdbc.license +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 1997-2011, PostgreSQL Global Development Group -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -3. Neither the name of the PostgreSQL Global Development Group nor the names - of its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/components/database/postgresql-jdbc/postgresql83-jdbc.p5m b/components/database/postgresql-jdbc/postgresql-jdbc.p5m similarity index 58% rename from components/database/postgresql-jdbc/postgresql83-jdbc.p5m rename to components/database/postgresql-jdbc/postgresql-jdbc.p5m index 792c09a52..a96afd46a 100644 --- a/components/database/postgresql-jdbc/postgresql83-jdbc.p5m +++ b/components/database/postgresql-jdbc/postgresql-jdbc.p5m @@ -10,16 +10,17 @@ # # -# Copyright 2013 Alexander Pyhalov. All rights reserved. +# Copyright 2017 Alexander Pyhalov # -set name=pkg.fmri value=pkg:/database/postgres-83/connector/jdbc@8.3.603,5.11-2015.0.2.0 -set name=pkg.renamed value=true - -set name=pkg.summary value="JDBC driver for PostgreSQL" -set name=info.classification value=org.opensolaris.category.2008:System/Databases -set name=info.source-url value=$(COMPONENT_ARCHIVE_URL) +set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) +set name=pkg.summary value="$(COMPONENT_SUMMARY)" +set name=info.classification value="$(COMPONENT_CLASSIFICATION)" set name=info.upstream-url value=$(COMPONENT_PROJECT_URL) +set name=info.source-url value=$(COMPONENT_ARCHIVE_URL) set name=org.opensolaris.consolidation value=$(CONSOLIDATION) -depend fmri=database/postgres/connector/jdbc type=require +license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)' + +link path=usr/postgres/jdbc/postgresql.jar target=postgresql-jdbc4.jar +file path=usr/postgres/jdbc/postgresql-jdbc4.jar -- 2.11.4.GIT