Name: perl-GCJ-Cni Version: 0.03 Release: 1%{?dist} Summary: CNI Bindings to GNU Compiler for Java License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/GCJ-Cni/ Source0: http://www.cpan.org/authors/id/R/RU/RUSEKD/GCJ-Cni-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(Module::Build) BuildRequires: perl(Test::Simple) BuildRequires: libgcj-devel BuildRequires: swig Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description This module wraps the GCJ CNI interface for use in Perl. This library is needed to call natively compiled (by way of GCJ) Java classes from Perl. This can be used to write Perl modules in Java instead of the customary C or C++. %prep %setup -q -n GCJ-Cni-%{version} %build # Regenerate the SWIG wrapper, to override obsolete lib/GCJ/Cni.xs swig -Wall -perl -o lib/GCJ/Cni.c lib/GCJ/Cni.i # Link latest libgcj to a shadow libdir to work around GCC packaging bug mkdir -p %{_lib} ln -sf $(ls -d %{_libdir}/libgcj.so* |sort -rn |head -n1) %{_lib}/libgcj.so # ld setting can be removed once the bug mentioned above is fixed %{__perl} Build.PL installdirs=vendor --config ld="%{__cc} -L%{_lib}" ./Build %install rm -rf $RPM_BUILD_ROOT ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \; find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} $RPM_BUILD_ROOT/* %check ./Build test %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc %{perl_vendorarch}/auto/* %{perl_vendorarch}/GCJ* %{_mandir}/man3/* %changelog * Sat Apr 18 2009 Lubomir Rintel 0.03-1 - Regenerate the SWIG C wrapper - Fix BRs - Work around lack of libgcj.so in libgcj-devel - Specfile autogenerated by cpanspec 1.78.