2012-01-03 11:18:42 +00:00
|
|
|
#
|
2012-04-03 13:54:47 +00:00
|
|
|
# spec file for package apache-commons-codec
|
2012-01-03 11:18:42 +00:00
|
|
|
#
|
2013-08-26 14:10:34 +00:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2012-04-03 13:54:47 +00:00
|
|
|
# Copyright (c) 2000-2010, JPackage Project
|
|
|
|
# All rights reserved.
|
2012-01-03 11:18:42 +00:00
|
|
|
#
|
2012-04-03 13:54:47 +00:00
|
|
|
# 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/
|
2012-01-03 11:18:42 +00:00
|
|
|
#
|
|
|
|
|
2012-04-03 13:54:47 +00:00
|
|
|
|
2012-01-03 11:18:42 +00:00
|
|
|
# % bcond_without maven
|
|
|
|
|
|
|
|
%define base_name codec
|
|
|
|
%define short_name commons-%{base_name}
|
|
|
|
|
|
|
|
Name: apache-commons-codec
|
2013-08-26 14:10:34 +00:00
|
|
|
Version: 1.8
|
2012-02-28 09:57:37 +00:00
|
|
|
Release: 0
|
2012-01-03 11:18:42 +00:00
|
|
|
Summary: Apache Commons Codec Package
|
2012-04-03 13:54:47 +00:00
|
|
|
License: Apache-2.0
|
2012-01-03 11:18:42 +00:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
Url: http://commons.apache.org/codec/
|
|
|
|
Source0: http://www.apache.org/dist/jakarta/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
2013-08-26 14:10:34 +00:00
|
|
|
Source1: http://www.apache.org/dist/jakarta/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc
|
|
|
|
Source2: apache-commons-codec.keyring
|
2012-01-03 11:18:42 +00:00
|
|
|
Source4: MANIFEST.MF
|
2012-02-28 09:57:37 +00:00
|
|
|
|
2012-01-03 11:18:42 +00:00
|
|
|
BuildRequires: ant >= 1.7
|
2012-02-28 09:57:37 +00:00
|
|
|
BuildRequires: ant-junit >= 1.7
|
|
|
|
BuildRequires: java-devel >= 1.6.0
|
2013-08-26 14:10:34 +00:00
|
|
|
# FIXME: mozilla-nss is necessary in order to use crypto, which is tested via junit tests
|
|
|
|
# this should be a dependency of openjdk itself
|
|
|
|
BuildRequires: gpg-offline
|
2012-04-03 13:54:47 +00:00
|
|
|
BuildRequires: junit4
|
2013-08-26 14:10:34 +00:00
|
|
|
BuildRequires: mozilla-nss
|
2012-02-28 09:57:37 +00:00
|
|
|
|
2012-01-03 11:18:42 +00:00
|
|
|
%if %with maven
|
|
|
|
BuildRequires: apache-commons-parent >= 12
|
|
|
|
BuildRequires: maven-surefire-maven-plugin
|
|
|
|
BuildRequires: maven-surefire-provider-junit
|
2012-04-03 13:54:47 +00:00
|
|
|
BuildRequires: maven2 >= 2.0.8
|
2012-01-03 11:18:42 +00:00
|
|
|
BuildRequires: maven2-plugin-antrun
|
|
|
|
BuildRequires: maven2-plugin-assembly
|
|
|
|
BuildRequires: maven2-plugin-compiler
|
|
|
|
BuildRequires: maven2-plugin-idea
|
|
|
|
BuildRequires: maven2-plugin-install
|
|
|
|
BuildRequires: maven2-plugin-jar
|
|
|
|
BuildRequires: maven2-plugin-javadoc
|
|
|
|
BuildRequires: maven2-plugin-resources
|
|
|
|
%endif
|
|
|
|
Requires(post): jpackage-utils >= 1.7.5
|
|
|
|
Requires(postun): jpackage-utils >= 1.7.5
|
|
|
|
|
|
|
|
Requires: java >= 1.6.0
|
|
|
|
Provides: jakarta-%{short_name} = %{version}
|
|
|
|
Obsoletes: jakarta-%{short_name} < %{version}
|
|
|
|
Provides: %{short_name} = %{version}
|
|
|
|
Obsoletes: %{short_name} < %{version}
|
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
Commons Codec is an attempt to provide definitive implementations of
|
|
|
|
commonly used encoders and decoders.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: java-javadoc
|
|
|
|
Provides: jakarta-%{short_name}-javadoc = %{version}
|
|
|
|
Obsoletes: jakarta-%{short_name}-javadoc < %{version}
|
|
|
|
Provides: %{short_name}-javadoc = %{version}
|
|
|
|
Obsoletes: %{short_name}-javadoc < %{version}
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
Javadoc for %{name}.
|
|
|
|
|
|
|
|
%prep
|
2013-08-26 14:10:34 +00:00
|
|
|
%gpg_verify %{SOURCE1}
|
2012-01-03 11:18:42 +00:00
|
|
|
%setup -q -n %{short_name}-%{version}-src
|
|
|
|
|
|
|
|
#fixes eof encoding
|
2012-02-28 09:57:37 +00:00
|
|
|
sed -i 's/\r//' RELEASE-NOTES*.txt LICENSE.txt NOTICE.txt
|
2012-01-03 11:18:42 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%if %with maven
|
|
|
|
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
|
|
|
mkdir -p ${MAVEN_REPO_LOCAL}
|
|
|
|
export MAVEN_OPTS="-Dmaven2.jpp.mode=true -Dmaven2.jpp.depmap.file=%{SOURCE2} -Dmaven.repo.local=${MAVEN_REPO_LOCAL} -Dproject.build.directory=$(pwd)/target"
|
|
|
|
%{_bindir}/mvn-jpp \
|
|
|
|
-e \
|
|
|
|
-s $(pwd)/settings.xml \
|
|
|
|
install javadoc:javadoc
|
|
|
|
%else
|
|
|
|
|
2012-04-02 13:00:42 +00:00
|
|
|
export CLASSPATH=$(build-classpath junit4)
|
2013-08-26 14:10:34 +00:00
|
|
|
ant -Dbuild.sysclasspath=first \
|
2012-01-03 11:18:42 +00:00
|
|
|
-Dconf.home=src/conf \
|
|
|
|
-Dbuild.home=build \
|
2012-04-02 13:00:42 +00:00
|
|
|
-Dsource.home=src/main/java \
|
|
|
|
-Dtest.home=src/test/java \
|
2012-01-03 11:18:42 +00:00
|
|
|
-Ddist.home=dist \
|
|
|
|
-Dcomponent.title=%{short_name} \
|
|
|
|
-Dcomponent.version=%{version} \
|
|
|
|
-Dfinal.name=%{name}-%{version} \
|
|
|
|
-Dextension.name=%{short_name} \
|
|
|
|
test jar javadoc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
# jars
|
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
|
|
|
%if %with maven
|
|
|
|
cp -p target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
|
|
|
%else
|
|
|
|
jar umf %{SOURCE4} dist/%{name}-%{version}.jar
|
|
|
|
cp -p dist/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
|
|
|
%endif
|
|
|
|
ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}-%{version}.jar
|
|
|
|
ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
|
|
|
ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/jakarta-%{short_name}-%{version}.jar
|
|
|
|
ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/jakarta-%{short_name}.jar
|
|
|
|
|
|
|
|
# Install pom file
|
2013-08-26 14:10:34 +00:00
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
|
|
|
install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom
|
|
|
|
%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar -a "%{short_name}:%{short_name}"
|
2012-01-03 11:18:42 +00:00
|
|
|
|
|
|
|
# javadoc
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
|
|
%if %with maven
|
|
|
|
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
|
|
%else
|
|
|
|
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
|
|
%endif
|
|
|
|
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/jakarta-%{short_name}-%{version}
|
|
|
|
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/jakarta-%{short_name}
|
|
|
|
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc LICENSE.txt RELEASE-NOTES.txt
|
|
|
|
%{_javadir}/*.jar
|
2013-08-26 14:10:34 +00:00
|
|
|
%{_mavenpomdir}/*
|
2012-01-03 11:18:42 +00:00
|
|
|
%{_mavendepmapfragdir}/*
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_javadocdir}/*
|
|
|
|
|
|
|
|
%changelog
|