File unboundid-ldapsdk.spec of Package unboundid-ldapsdk
#
# spec file for package unboundid-ldapsdk
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global commit 42839ddf0d77d954805fbbe3cce73a792af40474
%global gitname ldapsdk
Name: unboundid-ldapsdk
Version: 6.0.9
Release: 2%{?dist}
Summary: UnboundID LDAP SDK for Java
License: Apache-2.0 or GPL-2.0-or-later or LGPL-2.1-or-later
Group: Development/Libraries/Java
URL: https://www.ldap.com/unboundid-ldap-sdk-for-java
Source: https://github.com/pingidentity/ldapsdk/archive/%{version}.tar.gz#:/%{gitname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: ant
BuildRequires: javapackages-local
BuildRequires: xmvn-install
%description
The UnboundID LDAP SDK for Java is a fast, powerful, user-friendly, and
completely free and open source Java library for communicating with LDAP
directory servers and performing related tasks like reading and writing
LDIF, encoding and decoding data using base64 and ASN.1 BER, and performing
secure communication.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{gitname}-%{version}
#remove external prebuilt libraries
rm -rf ext
find
%build
# checkstyle configuration files were in the ext directory
# code doesn't pass checkstyle 5.6 disabling the check until
# upstream fixes it.
ant \
-Dcheckstyle.enabled=false \
-Drepository-info.revision=%{commit} \
-Drepository-info.revision-number=-1 \
-Drepository-info.type=git \
-Drepository-info.url=https://github.com/pingidentity/ldapsdk.git \
-Depository-info.path=\/ \
-f build.xml package
%install
%jar -xf build/package/%{name}-%{version}-maven.jar
rm -fr META-INF
mkdir javadoc
pushd javadoc
%jar -xf ../unboundid-ldapsdk-*-javadoc.jar
rm -fr META-INF
popd
%mvn_artifact %{name}-%{version}.pom %{name}-%{version}.jar
%mvn_file com.unboundid:%{name} %{name}
%mvn_install -J javadoc
%files -f .mfiles
%license dist-root/LICENSE*.txt
%doc dist-root/README.txt
%files javadoc -f .mfiles-javadoc
%license dist-root/LICENSE*.txt
%changelog