%define name posix %define version 1.1.6 %define release 1 %ifos aix4.1 %define javalib /usr/jdk_base/lib/aix/native_threads %else %define javalib /bms/lib/java %endif %define javaext /java/lib/ext Summary: Java wrapper for selected Posix APIs Name: %{name} Version: %{version} Release: %{release} Copyright: LGPL Group: System Environment/Libraries Source: %{name}-%{version}.tar.gz BuildRoot: /var/tmp/%{name}-buildroot Vendor: Stuart D. Gathman Packager: Stuart D. Gathman Requires: bmsjava BuildRequires: bmsjava %description This package provides partial access to the posix API from Java. It uses a JNI library which should be portable to other posix systems. I started this package with the intent of making it reusable by others. However, it only has the classes I have needed for my own projects at present. I am making the source and docs public so that others can reuse what I have so far and so that I can collect any additions added by others. %prep %setup -q %build %ifos aix4.1 CC=gcc CXXFLAGS="-O -I/usr/jdk_base/include -I/usr/jdk_base/include/aix -mthreads" LIB="-mthreads -Wl,-blibpath:/lib:/usr/lib -lpthreads -L%{javalib} -ljava" %endif %ifos Linux CXXFLAGS="-O -pthread -I/java/include -I/java/include/linux \ -DHAVE_MSGBUF -DHAS_SEM_POST -Dsigthreadmask=pthread_sigmask" LIB="-pthread -L%{javalib} -ljava" %endif make all CC="$CC" CXXFLAGS="$CXXFLAGS" LIB="$LIB" mkdir classes javac -q -target 1.1 -classpath /bms/java -d $PWD/classes *.java %install mkdir -p $RPM_BUILD_ROOT/bms/java mkdir -p $RPM_BUILD_ROOT%{javalib} mkdir -p $RPM_BUILD_ROOT%{javaext} cd classes zip -r $RPM_BUILD_ROOT/%{javaext}/posix.zip posix cd - %ifos aix4.1 cp posix.so $RPM_BUILD_ROOT%{javalib}/libposix.a %else cp posix.so $RPM_BUILD_ROOT%{javalib}/libposix.so %endif %files %doc CREDITS TODO COPYING %defattr(-,root,bin) %{javaext}/* %{javalib}/* %changelog * Wed May 18 2005 Stuart Gathman 1.1.6-1 - fix Passwd parsing of empty field * Wed May 18 2005 Stuart Gathman 1.1.5-2 - export Signal.kill - implement SemSet