File jakarta-commons-net.spec of Package jakarta-commons-net
#
# spec file for package jakarta-commons-net
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define base_name net
%define short_name commons-%{base_name}
Name: jakarta-commons-net
Version: 1.4.1
Release: 0
Summary: Jakarta Commons Net Package
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://commons.apache.org/commons-net/
Source0: http://www.apache.org/dist/jakarta/commons/net/source/commons-net-1.4.1-src.tar.bz2
Source1: pom-maven2jpp-depcat.xsl
Source2: pom-maven2jpp-newdepmap.xsl
Source3: pom-maven2jpp-mapdeps.xsl
Source4: commons-net-1.4.1-jpp-depmap.xml
Source5: commons-build.tar.gz
Source6: commons-net-1.4.1.pom
Patch0: %{name}-crosslink.patch
Patch1: %{short_name}-%{version}-project_xml.patch
Patch2: %{short_name}-%{version}-project_properties.patch
#PATCH-FIX-UPSTREAM: bnc#749895
#http://svn-master.apache.org/viewvc?view=revision&revision=1294922
Patch3: commons-net-ftp-leap-year-parsing.patch
BuildRequires: ant >= 1.6
BuildRequires: java-devel >= 1.6.0
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: oro
Requires: oro >= 2.0.8
Provides: %{short_name} = %{version}-%{release}
Obsoletes: %{short_name} < %{version}-%{release}
BuildArch: noarch
%description
This is an Internet protocol suite Java library originally developed by
ORO, Inc. This version supports Finger, Whois, TFTP, Telnet, POP3,
FTP, NNTP, SMTP, and some miscellaneous protocols like Time and Echo as
well as BSD R command support. The purpose of the library is to provide
fundamental protocol access, not higher-level abstractions.
%package javadoc
Summary: Jakarta Commons Net Package
Group: Development/Libraries/Java
%description javadoc
This is an Internet protocol suite Java library originally developed by
ORO, Inc. This version supports Finger, Whois, TFTP, Telnet, POP3,
FTP, NNTP, SMTP, and some miscellaneous protocols like Time and Echo as
well as BSD R command support. The purpose of the library is to provide
fundamental protocol access, not higher-level abstractions.
%prep
%setup -q -n %{short_name}-%{version}
gzip -dc %{SOURCE5} | tar xf -
%patch0 -b .sav
%patch1 -b .sav
%patch2 -b .sav
%patch3
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
%build
mkdir -p target/lib
ln -s %{_javadir}/oro.jar target/lib
ln -s %{_javadir}/junit.jar target/lib
ant \
-Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
-Dnoget=true -Dfinal.name=commons-net-%{version} -Dj2se.api=%{_javadocdir}/java \
jar javadoc
%install
# jars
install -d -m 755 %{buildroot}%{_javadir}
install -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
(cd %{buildroot}%{_javadir} && for jar in jakarta-*; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`; done)
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 %{SOURCE6} \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}
%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt
%{_javadir}/*
%{_mavenpomdir}/*
%{_datadir}/maven-metadata/%{name}.xml
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}
%changelog