Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37040041
en ru br
ALT Linux repositórios
S:42.6.0-alt1_1jpp11
5.0: 8.1.407-alt1_2jpp1.7
4.1: 8.1.407-alt1_2jpp1.7
4.0: 8.1.407-alt1_2jpp1.7

Group :: Banco de dados
RPM: postgresql-jdbc

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Epoch: 0
Group: Databases
# BEGIN SourceDeps(oneline):
BuildRequires(pre): rpm-macros-java
# END SourceDeps(oneline)
BuildRequires: /proc rpm-build-java
BuildRequires: jpackage-default
# see https://bugzilla.altlinux.org/show_bug.cgi?id=10382
%define _localstatedir %{_var}
# Copyright (c) 2000-2005, JPackage Project
# 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 JPackage Project 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.


# Configuration for rpmbuild, might be specified by options

# like e.g. 'rpmbuild --define "runselftest 0"'.

# =============================================================================

# IMPORTANT NOTE: This spec file is maintained on two places -- in native
# Fedora repo [1] and in pgjdbc upstream [2].  Please, keep that in sync
# (manual effort!) so both Fedora and Upstream can benefit from automatic
# packaging CI, this is now done in [3] Copr project.
# [1] https://src.fedoraproject.org/rpms/postgresql-jdbc
# [2] https://github.com/pgjdbc/pgjdbc/tree/master/packaging/rpm
# [3] https://copr.fedorainfracloud.org/coprs/g/pgjdbc/pgjdbc-travis/
# ============================================================================

%{!?runselftest:%global runselftest 0}

%global section devel
%global source_path pgjdbc/src/main/java/org/postgresql

Summary: JDBC driver for PostgreSQL
Name: postgresql-jdbc
Version: 42.6.0
Release: alt1_1jpp11
License: BSD-2-Clause
URL: http://jdbc.postgresql.org/

Source0: https://repo1.maven.org/maven2/org/postgresql/postgresql/%{version}/postgresql-%{version}-jdbc-src.tar.gz
Provides: pgjdbc = %version-%release

BuildArch: noarch
BuildRequires: maven-local
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: classloader-leak-test-framework

BuildRequires: mvn(com.ongres.scram:client)
BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin)
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit-platform)
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api)
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-engine)
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-params)
BuildRequires: mvn(org.junit.vintage:junit-vintage-engine)

%if %runselftest
BuildRequires: postgresql15-server
BuildRequires: postgresql-test-rpm-macros
%endif

# gettext is only needed if we try to update translations

#BuildRequires: gettext

Obsoletes: %{name}-parent-poms < 42.2.2-2
Source44: import.info

%description
PostgreSQL is an advanced Object-Relational database management
system. The postgresql-jdbc package includes the .jar files needed for
Java programs to access a PostgreSQL database.


%package javadoc
Group: Development/Java
Summary: API docs for %{name}
BuildArch: noarch

%description javadoc
This package contains the API Documentation for %{name}.


%prep
%setup -c -q

mv postgresql-%{version}-jdbc-src/* .

# remove any binary libs

find -type f \( -name "*.jar" -or -name "*.class" \) | xargs rm -f

# Build parent POMs in the same Maven call.

%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-shade-plugin']"

# compat symlink: requested by dtardon (libreoffice), reverts part of

# 0af97ce32de877 commit.
%mvn_file org.postgresql:postgresql %{name}/postgresql %{name} postgresql

# For compat reasons, make Maven artifact available under older coordinates.

%mvn_alias org.postgresql:postgresql postgresql:postgresql

# remove unmet dependency

%pom_remove_dep uk.org.webcompere:system-stubs-jupiter

# remove tests that depend on the system-stubs-jupiter

rm src/test/java/org/postgresql/test/jdbc2/DriverTest.java \
  src/test/java/org/postgresql/util/OSUtilTest.java \
  src/test/java/org/postgresql/jdbcurlresolver/PgServiceConfParserTest.java \
  src/test/java/org/postgresql/jdbcurlresolver/PgPassParserTest.java \
  src/test/java/org/postgresql/util/StubEnvironmentAndProperties.java


%build
# Ideally we would run "sh update-translations.sh" here, but that results
# in inserting the build timestamp into the generated messages_*.class
# files, which makes rpmdiff complain about multilib conflicts if the
# different platforms don't build in the same minute.  For now, rely on
# upstream to have updated the translations files before packaging.

# Include PostgreSQL testing methods and variables.

%if %runselftest
%postgresql_tests_init

PGTESTS_LOCALE=C.UTF-8

cat <<EOF > build.local.properties
server=localhost
port=$PGTESTS_PORT
database=test
username=test
password=test
privilegedUser=$PGTESTS_ADMIN
privilegedPassword=$PGTESTS_ADMINPASS
preparethreshold=5
loglevel=0
protocolVersion=0
EOF

# Start the local PG cluster.

%postgresql_tests_start
%else
# -f is equal to -Dmaven.test.skip=true
opts="-f"
%endif

%mvn_build $opts --xmvn-javadoc


%install
%mvn_install


%files -f .mfiles
%doc --no-dereference LICENSE
%doc README.md


%files javadoc -f .mfiles-javadoc
%doc --no-dereference LICENSE


%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009