diff --git a/.cvsignore b/.cvsignore
index e69de29..562b44e 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -0,0 +1 @@
+jna-3.0.2.tar.bz2
diff --git a/jna-3.0.2-dynlink-and-cflags.patch b/jna-3.0.2-dynlink-and-cflags.patch
new file mode 100644
index 0000000..7ab3201
--- /dev/null
+++ b/jna-3.0.2-dynlink-and-cflags.patch
@@ -0,0 +1,128 @@
+--- jna-3.0.2.default/build.xml 2008-02-28 14:34:44.000000000 -0500
++++ jna-3.0.2/build.xml 2008-04-03 23:20:07.000000000 -0400
+@@ -17,6 +17,8 @@
+
+
+
++
++
+
+
+
+@@ -311,6 +313,8 @@
+
+
+
++
++
+
+
+
+@@ -319,6 +323,19 @@
+
+
+
++
++
++
++
++
++
++
++
++
++
++
++
++
+
+
+
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+
+
+ = 1.6 ant jpackage-utils ant-nodeps
+BuildRequires: libX11-devel libXt-devel libffi-devel
+# We manually require libffi because find-requires doesn't work
+# inside jars.
+Requires: java >= 1:1.6.0 jpackage-utils
+
+%description
+JNA provides Java programs easy access to native shared libraries
+(DLLs on Windows) without writing anything but Java code. JNA's
+design aims to provide native access in a natural way with a
+minimum of effort. No boilerplate or generated code is required.
+While some attention is paid to performance, correctness and ease
+of use take priority.
+
+
+%package javadoc
+Summary: Javadocs for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+
+
+%description javadoc
+This package contains the javadocs for %{name}.
+
+
+%prep
+%setup -q -n %{name}-%{version}
+%patch0 -p1
+sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
+
+# all java binaries must be removed from the sources
+find . -name '*.jar' -exec rm -f '{}' \;
+find . -name '*.class' -exec rm -f '{}' \;
+
+# remove internal copy of libffi
+rm -rf native/libffi
+
+# remove random unused zips
+rm dist/{src,doc}.zip
+
+# clean LICENSE.txt
+sed -i 's/\r//' LICENSE.txt
+chmod 0644 LICENSE.txt
+
+
+%build
+# We pass -Ddynlink.native which comes from our patch because
+# upstream doesn't want to default to dynamic linking.
+ant jar -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true
+ant javadoc
+
+
+%install
+rm -rf %{buildroot}
+
+# jars
+install -D -m 644 build/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
+(cd %{buildroot}%{_javadir}/; for jar in `ls *-%{version}.jar`; do ln -s $jar `echo $jar | sed -e 's/-%{version}//'`; done)
+# NOTE: JNA has highly custom code to look for native jars in this
+# directory. Since this roughly matches the jpackage guidelines,
+# we'll leave it unchanged.
+install -d -m 755 %{buildroot}%{_libdir}/%{name}
+install -m 755 build/native/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
+
+# javadocs
+install -p -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
+cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE.txt
+%{_libdir}/%{name}
+%{_javadir}/*.jar
+
+%files javadoc
+%defattr(-,root,root,-)
+%{_javadocdir}/%{name}-%{version}
+
+
+%changelog
+* Fri Apr 04 2008 Colin Walters - 3.0.2-7
+- Add patch to use JPackage-compatible JNI library path
+- Do build debuginfo package
+- Refactor build patch greatly so it's hopefully upstreamable
+- Install .so directly to JNI directory, rather than inside jar
+- Clean up Requires/BuildRequires (thanks Mamoru Tasaka)
+
+* Sun Mar 30 2008 Conrad Meyer - 3.0.2-6
+- -javadocs should be -javadoc.
+- %%files section cleaned a bit.
+
+* Mon Mar 17 2008 Conrad Meyer - 3.0.2-5
+- -javadocs package should be in group "Documentation".
+
+* Mon Mar 17 2008 Conrad Meyer - 3.0.2-4
+- License should be LGPLv2+, not GPLv2+.
+- Several minor fixes.
+- Fix Requires in javadoc package.
+
+* Sun Mar 16 2008 Conrad Meyer - 3.0.2-3
+- Don't use internal libffi.
+
+* Thu Mar 6 2008 Conrad Meyer - 3.0.2-2
+- Don't pull in jars from the web.
+
+* Mon Mar 3 2008 Conrad Meyer - 3.0.2-1
+- Initial package.
diff --git a/sources b/sources
index e69de29..37aef27 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+4f177e179adfdb3c2289c6f36445809f jna-3.0.2.tar.bz2