%global namedreltag -rc3 %global namedversion %{version}%{?namedreltag} # require gluegen2 with android support # rebuild gluegen2 if you want enable this feature %define with_android 0 Name: jogl2 Version: 2.0 Release: %mkrel 4 Summary: Java bindings for OpenGL API Group: Development/Java License: BSD Url: http://jogamp.org/ # https://github.com/sgothel/ # mkdir -p jogl2-2.0-rc3 # git clone git://jogamp.org/srv/scm/jogl.git # cd jogl # git archive v2.0-rc3 | tar -x -C ../jogl2-2.0-rc3 # cd .. # tar czf jogl2-2.0-rc3-src-git.tar.gz jogl2-2.0-rc3 Source0: jogl2-%{namedversion}-src-git.tar.gz Patch0: jogl2-swt.patch Patch1: jogl2-disable_git_call.patch Patch2: jogl2-variousFixes.patch Patch3: jogl2-javadoc.patch Patch4: jogl2-linker.cfg.id.os.patch Patch5: jogl2-otherArchsoswin.patch Patch6: jogl2-otherArchsoswin_2.patch Patch7: jogl2-arch_naming.patch Patch8: jogl2-disable_android.patch Patch9: jogl2-disable_android_2.patch Patch10: jogl2-pom.patch BuildRequires: java-devel BuildRequires: java-javadoc BuildRequires: jpackage-utils %if %with_android BuildRequires: android %endif BuildRequires: ant BuildRequires: ant-contrib >= 1.0-0.12.b3.1 BuildRequires: ant-antlr BuildRequires: ant-junit BuildRequires: cpptasks >= 1.0-0.b5.0.0 #BuildRequires: cpptasks-parallel BuildRequires: eclipse-swt #BuildRequires: gluegen2 BuildRequires: gluegen2-javadoc BuildRequires: gluegen2-source BuildRequires: junit4 BuildRequires: freeglut-devel # MESA BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glesv1_cm) BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xproto) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xxf86vm) # pom req Requires: gluegen2 Requires: java Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils %description The JOGL project hosts the development version of the Java Bindings for OpenGL (JSR-231), and is designed to provide hardware-supported 3D graphics to applications written in Java. JOGL is not the official reference implementation of the JSR, but an evolving workspace; snapshots are taken from this workspace which become the official reference implementations of the JSR. JOGL provides full access to the APIs in the OpenGL 1.3 - 3.0, 3.1 - 3.3, >= 4.0, ES 1.x and ES 2.x specification as well as nearly all vendor extensions. It integrates with the AWT and Swing widget sets, as well with custom windowing toolkits using the NativeWindow API. It is part of a suite of open-source technologies initiated by the Game Technology Group at Sun Microsystems. %package toolkits Group: Development/Java Summary: Toolkits to play with JOGL2 Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: jpackage-utils BuildArch: noarch %description toolkits This package includes JOGL toolkits.. %package javadoc Group: Development/Java Summary: Javadoc for %{name} Requires: jpackage-utils BuildArch: noarch %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n jogl2-%{namedversion} %patch0 -p1 sed -i 's|/usr/lib/java/swt.jar|%{_libdir}/java/swt.jar|' make/build-common.xml %patch1 -p1 %patch2 -p1 %patch3 -p0 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %if !%with_android %patch8 -p1 %patch9 -p0 %endif %patch10 -p0 rm -rf .git .htaccess %build pushd make %ant \ -Dantlr.jar=$(build-classpath antlr) \ %if %with_android -Dandroid.jar=$(build-classpath android) \ %endif -Dsetup.noCDC=true \ all ant \ -Dantlr.jar=$(build-classpath antlr) \ -Djavadoc.link=%{_javadocdir}/java \ -Dgluegen.link=%{_javadocdir}/gluegen2 \ javadoc.all popd %install [ %{buildroot} != / ] && rm -rf %{buildroot} mkdir -p %{buildroot}%{_javadir} install -pm 644 build/jar/jogl.all.jar %{buildroot}%{_javadir}/%{name}.jar install -pm 644 build/jogl/jogl.util.fixedfuncemu.jar %{buildroot}%{_javadir}/ install -pm 644 build/jar/jogl-all-natives-*.jar %{buildroot}%{_javadir}/ mkdir -p %{buildroot}%{_jnidir} install -pm 755 build/lib/libjogl_desktop.so %{buildroot}%{_jnidir}/ install -pm 755 build/lib/libjogl_mobile.so %{buildroot}%{_jnidir}/ install -pm 755 build/lib/libnativewindow_awt.so %{buildroot}%{_jnidir}/ install -pm 755 build/lib/libnativewindow_x11.so %{buildroot}%{_jnidir}/ install -pm 755 build/lib/libnewt.so %{buildroot}%{_jnidir}/ install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -pm 644 make/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom %add_maven_depmap JPP-%{name}.pom %{name}.jar mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -pr build/javadoc/jogl/* %{buildroot}%{_javadocdir}/%{name}/ %post %update_maven_depmap %postun %update_maven_depmap %files %{_javadir}/*.jar %{_jnidir}/* %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %doc CHANGELOG.txt LICENSE.txt README.txt REPOSITORIES.txt %files toolkits %{_javadir}/jogl.util.fixedfuncemu.jar %files javadoc %{_javadocdir}/%{name} %changelog * 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