File apache-commons-pool2.spec of Package apache-commons-pool2
110
1
#
2
# spec file for package apache-commons-pool2
3
#
4
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
%define base_name pool
20
%define short_name commons-%{base_name}2
21
Name: apache-commons-pool2
22
Version: 2.4.2
23
Release: 0
24
Summary: Apache Commons Pool 2.x series
25
License: Apache-2.0
26
Group: Development/Libraries/Java
27
URL: https://commons.apache.org/proper/commons-pool/
28
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
29
Patch0: jakarta-commons-pool-build.patch
30
BuildRequires: ant
31
BuildRequires: cglib
32
BuildRequires: fdupes
33
BuildRequires: java-devel >= 1.8
34
BuildRequires: javapackages-local
35
BuildRequires: junit
36
Requires: cglib
37
Provides: %{short_name} = %{version}
38
Obsoletes: %{short_name} < %{version}
39
BuildArch: noarch
40
41
%description
42
The goal of the Pool 2.x package is to create and maintain an object
43
(instance) pooling package to be distributed under the ASF license. The
44
package supports a variety of pool implementations, but encourages
45
support of an interface that makes these implementations
46
interchangeable.
47
48
%package javadoc
49
Summary: Javadoc for %{name}
50
Group: Development/Libraries/Java
51
52
%description javadoc
53
The goal of Pool 2.x package it to create and maintain an object (instance)
54
pooling package to be distributed under the ASF license. The package
55
should support a variety of pool implementations, but encourage support
56
of an interface that makes these implementations interchangeable.
57
58
This package contains the javadoc documentation for the Apache Commons
59
Pool 2.x Package.
60
61
%prep
62
%setup -q -n %{short_name}-%{version}-src
63
# remove all binary libs
64
find . -name "*.jar" -exec rm -f {} \;
65
%patch0
66
67
%pom_remove_parent .
68
%pom_xpath_inject "pom:project" "<groupId>org.apache.commons</groupId>" .
69
70
%build
71
echo "cglib.jar=$(build-classpath cglib)" >> build.properties
72
ant \
73
-Djavac.target.version=8 -Djavac.src.version=8 \
74
-Djava.io.tmpdir=. clean dist
75
76
%install
77
# jars
78
install -d -m 755 %{buildroot}%{_javadir}
79
install -m 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
80
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done)
81
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
82
# pom
83
install -d -m 755 %{buildroot}%{_mavenpomdir}
84
install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom
85
%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar
86
87
# javadoc
88
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
89
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}
90
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
91
92
%files
93
%license LICENSE.txt
94
%doc README.txt
95
%{_javadir}/%{name}.jar
96
%{_javadir}/%{name}-%{version}.jar
97
%{_javadir}/%{short_name}.jar
98
%{_javadir}/%{short_name}-%{version}.jar
99
%{_mavenpomdir}/%{name}-%{version}.pom
100
%if %{defined _maven_repository}
101
%{_mavendepmapfragdir}/%{name}
102
%else
103
%{_datadir}/maven-metadata/%{name}.xml*
104
%endif
105
106
%files javadoc
107
%doc %{_javadocdir}/%{name}
108
109
%changelog
110