Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release-src > by-pkgid > 99dee1d1edcb1021f452fcea7c9f5719 > files > 1

gnu-trove-2.1.0-6.mga5.src.rpm

# Copyright (c) 2000-2005, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define short_name trove

Summary:        High performance collections for Java
Name:           gnu-%{short_name}
Version:        2.1.0
Release:        %mkrel 6
Epoch:          0
License:        LGPL
URL:            http://trove4j.sourceforge.net/
Group:          Development/Java
Source0:        http://sourceforge.net/projects/trove4j/files/trove/%{version}/trove-%{version}.tar.gz
Source1:        trove-build.xml
# http://repo1.maven.org/maven2/trove/trove/1.0.2/trove-1.0.2.pom
Source2:        trove-%{version}.pom
Patch0:         trove-2.1.0-build_xml.patch

BuildRequires:  java-devel
BuildRequires:  jpackage-utils
BuildRequires:  ant >= 0:1.6
BuildRequires:  ant-junit >= 0:1.6
BuildRequires:  junit

Requires:       java
Requires:       jpackage-utils
BuildArch:      noarch

Provides:       gnu.trove = %{epoch}:%{version}
Obsoletes:      gnu.trove < %{epoch}:%{version}

%description
The GNU Trove library has two objectives: 

Provide "free" (as in "free speech" and "free beer"), 
fast, lightweight implementations of the java.util 
Collections API. These implementations are designed 
to be pluggable replacements for their JDK equivalents. 

Whenever possible, provide the same collections support 
for primitive types. This gap in the JDK is often 
addressed by using the "wrapper" classes 
(java.lang.Integer, java.lang.Float, etc.) with 
Object-based collections. For most applications, however, 
collections which store primitives directly will require 
less space and yield significant performance gains. 


%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Java
Provides:       gnu.trove-javadoc = %{epoch}:%{version}
Obsoletes:      gnu.trove-javadoc < %{epoch}:%{version}

%description javadoc
High performance collections for Java.

This package contains javadoc for %{name}.

%prep
%setup -q -n %{short_name}-%{version}
%patch0 -p0

find -name '*.class' -exec rm -f '{}' \;
find -name '*.jar' -exec rm -f '{}' \;

rm -rf javadocs/*

%build

export OPT_JAR_LIST="ant/ant-junit junit"
export CLASSPATH=$PWD/output/generator_classes
%{ant} -Dbuild.sysclasspath=only dist

%install

# jars
mkdir -p %{buildroot}%{_javadir}
install -m 644 output/lib/%{short_name}-%{version}.jar \
      %{buildroot}%{_javadir}/%{name}.jar

(
  cd %{buildroot}%{_javadir}
  ln -sf %{name}.jar gnu.trove.jar
)

# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -pr output/javadocs/* %{buildroot}%{_javadocdir}/%{name}

mkdir -p %{buildroot}%{_mavenpomdir}
install -m 644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar

%files
%doc LICENSE.txt
%{_javadir}/%{name}.jar
%{_javadir}/gnu.trove.jar
%{_mavenpomdir}/JPP-%{name}.pom
%{_datadir}/maven-metadata/*

%pre javadoc
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :

%files javadoc
%doc %{_javadocdir}/%{name}

# -----------------------------------------------------------------------------


%changelog
* Thu Nov 06 2014 tv <tv> 0:2.1.0-6.mga5
+ Revision: 795938
- adjust file list
- fix using name as version in deps (years old bug...)
- Drop no longer needed BuildRequires on java-rpmbuild

* Wed Oct 15 2014 umeabot <umeabot> 0:2.1.0-5.mga5
+ Revision: 746944
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0:2.1.0-4.mga5
+ Revision: 679809
- Mageia 5 Mass Rebuild

* Fri Oct 18 2013 umeabot <umeabot> 0:2.1.0-3.mga4
+ Revision: 505118
- Mageia 4 Mass Rebuild

* Sat Jan 12 2013 umeabot <umeabot> 0:2.1.0-2.mga3
+ Revision: 352345
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Feb 05 2012 gil <gil> 0:2.1.0-1.mga2
+ Revision: 204875
- update to 2.1.0
- disabled gcj support
- added m2 pom

* Mon Jan 17 2011 dmorgan <dmorgan> 0:1.0.2-5.0.7.mga1
+ Revision: 21519
- imported package gnu-trove