File apache-commons-exec.spec of Package apache-commons-exec
98
1
#
2
# spec file for package apache-commons-exec
3
#
4
# Copyright (c) 2022 SUSE LLC
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
%global base_name exec
20
%global short_name commons-%{base_name}
21
%bcond_with tests
22
Name: apache-commons-exec
23
Version: 1.3
24
Release: 0
25
Summary: Java library to reliably execute external processes from within the JVM
26
License: Apache-2.0
27
Group: Development/Libraries/Java
28
URL: https://commons.apache.org/exec/
29
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
30
Patch0: commons-exec-1.3-build_xml.patch
31
BuildRequires: ant
32
BuildRequires: dos2unix
33
BuildRequires: fdupes
34
BuildRequires: javapackages-local
35
BuildArch: noarch
36
%if %{with tests}
37
BuildRequires: ant-junit
38
%endif
39
40
%description
41
Commons Exec is a library for dealing with external process execution and
42
environment management in Java.
43
44
%package javadoc
45
Summary: Javadocs for %{name}
46
Group: Documentation/HTML
47
48
%description javadoc
49
This package contains the API documentation for %{name}.
50
51
%prep
52
%setup -q -n %{short_name}-%{version}-src
53
%patch0 -p1
54
55
# Fix wrong end-of-line encoding
56
dos2unix LICENSE.txt NOTICE.txt RELEASE-NOTES.txt STATUS
57
58
# Shell scripts used for unit tests must be executable (see
59
# http://commons.apache.org/exec/faq.html#environment-testing)
60
chmod a+x src/test/scripts/*.sh
61
62
# Skip Exec57Test (it is unstable), see rhbz#1202260
63
find -name Exec57Test.java -delete
64
65
%pom_remove_parent .
66
67
%build
68
%{ant} \
69
%if %{without tests}
70
-Dmaven.test.skip=true \
71
%endif
72
jar javadoc
73
74
%install
75
# jar
76
install -dm 0755 %{buildroot}%{_javadir}
77
install -pm 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}.jar
78
ln -sf %{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar
79
# pom
80
install -dm 0755 %{buildroot}%{_mavenpomdir}
81
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}.pom
82
%add_maven_depmap %{short_name}.pom %{short_name}.jar
83
# javadoc
84
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
85
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
86
%fdupes -s %{buildroot}%{_javadocdir}
87
88
%files -f .mfiles
89
%license LICENSE.txt NOTICE.txt
90
%doc STATUS RELEASE-NOTES.txt
91
%{_javadir}/%{name}.jar
92
93
%files javadoc
94
%license LICENSE.txt NOTICE.txt
95
%{_javadocdir}/%{name}
96
97
%changelog
98