Here's my first stab at an RPM with the new scripts (find-and-nativify and rebuild-gcj-db). It's the OpenGL java bindings: http://people.redhat.com/green/FC4 A couple of observations.... It's still not super-trivial to add native versions of jar files. See attached spec file. On the other hand, I don't know how we could make it simpler. Our libjawt.so.6 is a bit of a problem. I was unable to run any jogl code with a non-gcj alternative, since they all pick up /usr/lib/libjawt.so.6, which has references to our gtk peers and fails to load. Should libjawt.so be an alternative? Or can we install it somewhere gcj specific? AG
Name: jogl Version: 1.1b10 Release: 1fc Epoch: 0 Summary: Java bindings for the OpenGL API. Group: System Environment/Libraries License: BSD URL: http://jogl.dev.java.net/ Source0: jogl-src.zip Source1: jogl.properties Source2: SGIFreeSWLicB.1.1.ps Source3: jogl-README.txt Patch0: %{name}-build.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ant, antlr, java-1.4.2-gcj-compat-devel, jpackage-utils >= 0:1.5 Requires: java-1.4.2-gcj-compat %description The JOGL Project hosts a reference implementation of the Java bindings for OpenGL API, and is designed to provide hardware-supported 3D graphics to applications written in the Java programming language. Is is part of a suite of open-source technologies initiated bu the Game Technology Group at Sun Microsystems. JOGL provides full access to the APIs in the OpenGL 1.5 specification as well as nearly all vendor extensions, and integrated with the AWT and Swing widget sets. %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation #BuildRequires: java-javadoc %description javadoc %{summary}. %prep %setup -q -n jogl %patch0 -p0 cp %{SOURCE1} . cp %{SOURCE2} . cp %{SOURCE3} . %build (cd make && ant -Duser.home=/usr/src/redhat/SOURCES linux javadoc.dev.x11) # Rename the jar into a versioned jar name and create the .so version. mv build/jogl.jar build/%{name}-%{version}.jar find-and-nativify . "$RPM_OPT_FLAGS -fPIC -fjni" %install rm -rf $RPM_BUILD_ROOT install -dm 755 $RPM_BUILD_ROOT%{_javadir} install -pm 644 build/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar install -dm 755 $RPM_BUILD_ROOT%{_libdir} install -pm 755 build/obj/libjogl.so $RPM_BUILD_ROOT%{_libdir}/libjogl.so install -pm 755 build/lib%{name}-%{version}.jar.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}-%{version}.jar.so install -pm 755 build/lib%{name}-%{version}.jar.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}-%{version}.jar.so ln -s lib%{name}-%{version}.jar.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.jar.so install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pR javadoc_jogl_dev/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} gcjdbdir=$RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`.d install -dm 755 $gcjdbdir gcj-dbtool -n $gcjdbdir/%{name}-%{version}.db 80000 gcj-dbtool -f $gcjdbdir/%{name}-%{version}.db \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar %{_libdir}/lib%{name}-%{version}.jar.so %clean rm -rf $RPM_BUILD_ROOT %post rebuild-gcj-db %{_libdir} %postun rebuild-gcj-db %{_libdir} %post javadoc rm -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} %files %defattr(644,root,root,755) %doc SGIFreeSWLicB.1.1.ps %doc jogl-README.txt %doc doc/* %{_javadir}/*.jar %{_libdir}/* %files javadoc %defattr(644,root,root,755) %doc %{_javadocdir}/%{name}-%{version} %ghost %doc %{_javadocdir}/%{name} %changelog * Sun Apr 3 2005 Anthony Green <green@xxxxxxxxxx> - 0:1.1b10-1fc - Created.