# baserelease defines which build revision of this version we're building. # The magical name baserelease is matched by the rpmdev-bumpspec tool, which # you should use. %global baserelease 1 %global pkg_name jogl %global pkg_version 2.0.2 #%global pkg_rc rc12 %if 0%{?pkg_rc:0} %global pkg_release 0.%{baserelease}.%{pkg_rc} %global src_name %{pkg_name}-v%{pkg_version}-%{pkg_rc} %else %global pkg_release %{baserelease} %global src_name %{pkg_name}-v%{pkg_version} %endif Name: jogl2 Epoch: 1 Version: %{pkg_version} Release: %mkrel %{pkg_release} Summary: Java bindings for the OpenGL API Group: Development/Java # For a breakdown of the licensing, see LICENSE.txt License: BSD and MIT and ASL 2.0 and ASL 1.1 URL: http://jogamp.org/ Source0: http://jogamp.org/deployment/jogamp-current/archive/Sources/%{src_name}.tar.7z Source1: %{name}-pom.xml # https://github.com/sgothel/jogl/pull/51 Patch1: %{name}-0001-fix-gluegen-gl-classpath.patch Patch2: %{name}-0002-deactivate-debug-printf.patch BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils BuildRequires: p7zip BuildRequires: gluegen2-devel BuildRequires: eclipse-swt BuildRequires: libxt-devel BuildRequires: libxrender-devel BuildRequires: libxxf86vm-devel BuildRequires: libxrandr-devel BuildRequires: maven-local Requires: java >= 1:1.6.0 Requires: jpackage-utils Requires: gluegen2 %description The JOGL project hosts the development version of the Java Binding for the OpenGL API (JSR-231), and is designed to provide hardware-supported 3D graphics to applications written in Java. JOGL provides full access to the APIs in the OpenGL 2.0 specification as well as nearly all vendor extensions, and integrates with the AWT and Swing widget sets. It is part of a suite of open-source technologies initiated by the Game Technology Group at Sun Microsystems. %if 0 %package javadoc Summary: Javadoc for jogl2 Group: Documentation Requires: jpackage-utils BuildArch: noarch Requires: jpackage-utils Requires: %{name} = %{version}-%{release} %description javadoc Javadoc for jogl2. %endif %package doc Summary: User manual for jogl2 Group: Documentation BuildArch: noarch Requires: %{name} = %{version}-%{release} %description doc User manual for jogl2. %prep # inline %%setup as 7z archive are not supported %setup -c -T -n %{src_name} cd .. /usr/bin/7za e -y %{SOURCE0} tar -xf %{src_name}.tar rm %{src_name}.tar cd %{src_name} chmod -Rf a+rX,u+w,g-w,o-w . %patch1 -p1 %patch2 -p1 # Remove bundled dependencies find -name "*.jar" -type f -exec rm {} \; find -name "*.apk" -type f -exec rm {} \; rm -fr make/lib # Restore the gluegen2 source code from gluegen2-devel cp -rdf %{_datadir}/gluegen2 ../gluegen # Fix file-not-utf8 for file in README.txt; do iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ touch -r $file $file.new && \ mv $file.new $file done # git executable should not be used, use true (to avoid checkout) instead sed -i 's/executable="git"/executable="true"/' make/build-common.xml %build cd make # As we never cross-compile this package, the SDK root is always / export TARGET_PLATFORM_ROOT=/ xargs -t ant <<EOF -Dc.compiler.debug=true -Djavacdebug=false %ifarch x86_64 -Djavac.memorymax=1024m %else -Djavac.memorymax=256m %endif -Dcommon.gluegen.build.done=true -Dantlr.jar=%{_javadir}/antlr.jar -Djunit.jar=%{_javadir}/junit.jar -Dant.jar=%{_javadir}/ant.jar -Dant-junit.jar=%{_javadir}/ant/ant-junit.jar -Dgluegen.jar=%{_javadir}/gluegen2.jar -Dgluegen-rt.jar=%{_jnidir}/gluegen2-rt.jar -Dswt.jar=%{_libdir}/eclipse/swt.jar -Djavadoc.link=%{_javadocdir}/java -Dgluegen.link=%{_javadocdir}/gluegen2 all EOF #javadoc.all %install mkdir -p %{buildroot}%{_javadir}/%{name} \ %{buildroot}%{_libdir}/%{name} \ %{buildroot}%{_jnidir} install build/jar/jogl-all.jar %{buildroot}%{_jnidir}/%{name}.jar ln -s ../../..%{_jnidir}/%{name}.jar %{buildroot}%{_libdir}/%{name}/ install -t %{buildroot}%{_libdir}/%{name}/ build/lib/*.so # Provide JPP pom mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom %add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.jogamp.jogl:jogl-all" %if 0 # Make the javadoc package mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -rdf build/javadoc/jogl/javadoc/* %{buildroot}%{_javadocdir}/%{name} %endif # Make the doc package mkdir -p %{buildroot}%{_docdir}/%{name} cp -rdf doc/* %{buildroot}%{_docdir}/%{name} # update links to javadoc find %{buildroot}%{_docdir}/%{name} -name '*.html' \ -exec sed -i "s|/deployment/jogamp-next/javadoc/jogl/javadoc|%{_javadocdir}/%{name}|g" {} + %files %doc README.txt LICENSE.txt CHANGELOG.txt %{_libdir}/%{name} %{_jnidir}/%{name}.jar %{_mavendepmapfragdir}/%{name} %{_mavenpomdir}/JPP-%{name}.pom %if 0 %files javadoc %doc LICENSE.txt %{_javadocdir}/%{name} %endif %files doc %doc LICENSE.txt %{_docdir}/%{name} %changelog * Sun Sep 22 2013 dmorgan <dmorgan> 1:2.0.2-1.mga4 + Revision: 483412 - Fix patch to swt.jar - Rebuild against new jpackage-utils - New version + grenoya <grenoya> - new version 2.0.2 * Mon Feb 13 2012 dmorgan <dmorgan> 2.0-4.mga2 + Revision: 208368 - mesaglw-devel does not exist anymore, so remove from buildrequires * Wed Jan 18 2012 dmorgan <dmorgan> 2.0-3.mga2 + Revision: 197683 - Remove ant-optional from buildrequires * Sat Dec 17 2011 gil <gil> 2.0-2.mga2 + Revision: 182903 - build fix rebuilt with ant-contrib 1.0-0.12.b3.1 support - BR ant-junit - imported package jogl2 + dmorgan <dmorgan> - Enable jni build Fix buildrequires