Summary: KDE-Style Busy Cursor for Java Name: libkjmouse Version: 1.3 Release: 1 Source0: libkjmouse-%{version}.tar.gz Copyright: LGPL Group: X11/Libraries BuildRoot: %{_tmppath}/%{name} %description KJMouse is a busy cursor similar to KDE 2.2's for Java applications. To get the mouse position and to set the always-on-top window status, KJMouse uses JNI and custom native code when on Win32 or X11 or, in the case of Mac OS X, the Cocoa Java library. This library contains the X11 native code. Note that /usr/lib will need to appear in LD_LIBRARY_PATH. This RPM contains an /etc/profile.d script that will automatically set this up. %prep %setup -q %build # Builders should add --define='JAVA_HOME /path/to/jdk' when building the RPM # Without that definition, the first JDK found in /usr/java is used, which # might not always be a good idea %{!?JAVA_HOME: %define JAVA_HOME $(find /usr/java -name j\*dk\*|head -n 1)} %configure --with-jdk=%{JAVA_HOME} make %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -fr $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # Install our profile.d script for LD_LIBRARY_PATH %{__install} -D -m0755 kjmouse.sh %{buildroot}%{_sysconfdir}/profile.d/kjmouse.sh # Remove installed but not packaged files %{__rm} -f %{buildroot}%{_libdir}/libkjmouse.la # Replace instances of "/usr/lib" with the correct %{_libdir} if [ "%{_libdir}" != "/usr/lib" ]; then [ -f "%{buildroot}%{_sysconfdir}/profile.d/kjmouse.sh" ] && sed -i -e "s/\\/usr\\/lib/$(echo %{_libdir}|sed -e "s/\\//\\\\\\//g")/gi" "%{buildroot}%{_sysconfdir}/profile.d/kjmouse.sh" [ -f "%{buildroot}%{_docdir}/README" ] && sed -i -e "s/\\/usr\\/lib/$(echo %{_libdir}|sed -e "s/\\//\\\\\\//g")/gi" "%{buildroot}%{_docdir}/README" fi %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -fr $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README NEWS AUTHORS COPYING ChangeLog %{_libdir}/libkjmouse.so* %{_sysconfdir}/profile.d/kjmouse.sh %changelog * Sun Nov 14 2004 Steven Lawrance - Created RPM for KJMouse 1.3