# Copyright (c) 2000-2010, 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 debug_package %{nil} Summary: Java 3D URL: http://java3d.java.net/ Name: java3d License: BSD and GPLv2 Group: Development/Libraries Version: 1.5.2 Release: 3%{?dist} Source0: java3d-%{version}.tgz Patch0: java3d-1.5.2-jpeg-codec.patch Patch1: java3d-1.5.2-vecmath.patch # The sources have to be pulled from Subversion. This script # gets them and creates the tarball. Source100: java3d-1.5.2-buildtarball.sh BuildRequires: ant BuildRequires: ant-nodeps BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils BuildRequires: vecmath BuildRequires: mesa-libGLw-devel Requires: java >= 1:1.6.0 Requires: jpackage-utils %description The Java 3D API provides a set of object-oriented interfaces that support a simple, high-level programming model you can use to build, render, and control the behavior of 3D objects and visual environments. With the Java 3D API, you can incorporate high quality, scalable, platform-independent 3D graphics into applications and applets based on Java technology. %package javadoc Summary: Javadoc for java3d Group: Documentation %description javadoc %{summary}. %package examples Summary: Examples of java3d Group: Documentation %description examples %{summary}. %prep %setup -q -c -n %{name} # Patch from Debian by Niels Thykier to replace use # of deprecated Sun JPEG codec with supported ImageIO methods. %patch0 -p1 -b .jpeg-codec # Patch to use Fedora vecmath package rather than building one. Although # the vecmath package is from an older Subversion repository, as of # 14-JUL-2012 the vecmath source code differs only in comments. %patch1 -p1 -b .vecmath # Convert ISO 8859-1 text files to UTF-8 for f in j3d{-core,-core-utils,-optional-utils,-examples}/COPYRIGHT.txt do iconv -f iso8859-1 -t utf-8 $f >$f.new touch -r $f $f.new mv $f.new $f done # remove .cvsignore files find . -name .cvsignore -exec rm {} \; %build pushd j3d-core # to avoid Out of heap memory on "small" machines ... export ANT_OPTS=-Xmx256m %ant \ -Dbuild.type=stable \ jar-opt docs-public popd %install export NO_BRP_CHECK_BYTECODE_VERSION=true %__install -dm 755 %{buildroot}%{_jnidir}/%{name} %__install -dm 755 %{buildroot}%{_javadocdir}/%{name}-%{version} # jars %__install -m 644 j3d-core/build/default/opt/lib/ext/*.jar \ %{buildroot}%{_jnidir}/%{name} %__install -m 755 j3d-core/build/default/opt/native/*.so \ %{buildroot}%{_jnidir}/%{name} # javadoc %__cp -a j3d-core/build/*/javadocs/docs-public/* \ %{buildroot}%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} # ghost symlink %files %doc j3d-core/*.txt %doc j3d-core/*.html %doc j3d-core/docs %dir %{_jnidir}/%{name} %{_jnidir}/%{name}/*.jar %{_jnidir}/%{name}/*.so %files javadoc %doc %{_javadocdir}/%{name}-%{version} %doc %{_javadocdir}/%{name} %files examples %doc j3d-examples/ %changelog * Sun Aug 05 2012 Eric Smith - 1.5.2-3 - Updated to include native code per suggestions by Joachim Katzer * Sat Jul 14 2012 Eric Smith - 1.5.2-2 - Added patch from Debian to use ImageIO methods instead of deprecated JPEG codec, to allow building on OpenJDK 7. - Use existing Fedora vecmath package. * Sun Jun 17 2012 Eric Smith - 1.5.2-1 - Initial version, based on spec from JPackage Project