Name: gluegen Version: 1.0.20102502svn Release: 4%{?dist} Summary: Java/JNI glue code generator to call out to ANSI C Group: Development/Libraries License: BSD URL: https://gluegen.dev.java.net/ # The source for this package was pulled from upstream's vcs. Use the # following commands to generate the tarball: #svn checkout https://gluegen.dev.java.net/svn/gluegen/tags/1.0b06a \ #gluegen --username login #tar -zcvf gluegen-1.0.20102502svn.tar.gz gluegen Source0: gluegen-1.0.20102502svn.tar.gz #Source1: gluegen.properties Patch0: antlr-properties.patch Patch1: no-solaris.patch #BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: java-devel >= 1:1.6.0 BuildRequires: ant-antlr BuildRequires: cpptasks BuildRequires: jpackage-utils Requires: java >= 1:1.6.0 Requires: jpackage-utils Requires: antlr %description GlueGen is a tool which automatically generates the Java and JNI code necessary to call C libraries. It reads as input ANSI C header files and separate configuration files which provide control over many aspects of the glue code generation. GlueGen uses a complete ANSI C parser and an internal representation (IR) capable of representing all C types to represent the APIs for which it generates interfaces. %package source Summary: GlueGen source code required to build JOGL Group: Development/Libraries BuildArch: noarch %description source GlueGen source code required to build JOGL %prep %setup -q -n %{name} %patch0 -p1 -b .antlr-properties.patch %patch1 -p1 -b .no-solaris.patch #Remove bundled .jar find -name "*.jar" -type f -exec rm {} \; #Remove hardcoded classpath sed -i -e 's|Class-Path: antlr.jar||' make/Manifest #Preserve the source code to generate gluegen-source cp -rdf ../%{name} ../%{name}-source rm -rdf ../%{name}-source/{doc,www,LICENSE.txt,gluegen} #Solve the spurious-executable-perm chmod 444 LICENSE.txt %if 0 #Wip - Try to get rid of the internal cpptasks sed -i -e 's|${gluegen.root}/make/lib/cpptasks.jar|%{_javadir}/cpptasks.jar|' make/gluegen-cpptasks.xml sed -i -e 's/gluegen.cpptasks/cpptasks/g' make/build.xml make/gluegen-cpptasks.xml sed -i -e 's|cpptasks.xml|gluegen-cpptasks.xml|' make/build.xml #sed -i -e 's|import file="gluegen.cpptasks.xml" /|!-- import file="cpptasks.xml" --|' make/build.xml %endif %build cd make ant \ -Dantlr.jar=$(build-classpath antlr) %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{_javadir}/%{name} install -D build/gluegen.jar %{buildroot}%{_javadir}/%{name}/gluegen-%{version}.jar install -D build/gluegen-rt.jar %{buildroot}%{_javadir}/%{name}/gluegen-rt-%{version}.jar install -D build/obj/libgluegen-rt.so %{buildroot}%{_libdir}/java/libgluegen-rt.so # Make the source package %define gluegen_source_dir %{_datadir}/gluegen-source %define inst_srcdir %{buildroot}/%{gluegen_source_dir} mkdir -p %{inst_srcdir}/%{name} cp -rdf ../%{name}-source/{make,src} %{inst_srcdir}/%{name} chmod 777 %{inst_srcdir}/%{name} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc LICENSE.txt %{_javadir}/%{name}/*.jar %{_libdir}/java/libgluegen-rt.so %files source %defattr(-, root, root, -) %{gluegen_source_dir} %changelog * Tue Mar 9 2010 Henrique Junior - 1.0.20102502svn-4 - Fixing some url issues and changing directories to guideline * Tue Mar 9 2010 Henrique Junior - 1.0.20102502svn-3 - Now, making gluegen-source for JOGL * Thu Feb 22 2010 Henrique Junior - 1.0.20102502svn-2 - Change to SVN version - Some refinements to .spec * Sun Feb 21 2010 Henrique Junior - 1.1.1-1 - Initial package with inspiration on Kwizart's spec - Gluegen and JOGL came from the same source (repackaged) - antlr-properties.patch points to the right location in Fedora - no-solaris.patch looks the "no sun cc" crash