commit e966adc5c149f229384d659dd342c72666ca2998
Author: Elan Ruusamäe <[email protected]>
Date:   Wed Nov 4 21:38:15 2015 +0200

    new, version 20150419
    
    based on fedora package, b16b08b

 java-sqlite.spec | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 jnipath.patch    | 14 +++++++++
 2 files changed, 101 insertions(+)
---
diff --git a/java-sqlite.spec b/java-sqlite.spec
new file mode 100644
index 0000000..e23c09e
--- /dev/null
+++ b/java-sqlite.spec
@@ -0,0 +1,87 @@
+#
+# Conditional build:
+%bcond_without javadoc         # don't build javadoc
+%bcond_without tests           # don't build and run tests
+
+%include       /usr/lib/rpm/macros.java
+Summary:       SQLite Java Wrapper/JDBC Driver
+Name:          java-sqlite
+Version:       20150419
+Release:       1
+License:       BSD
+Group:         Libraries/Java
+Source0:       http://www.ch-werner.de/javasqlite/javasqlite-%{version}.tar.gz
+# Source0-md5: 242e384c1cd863d6996a35cf8c1c1e97
+URL:           http://www.ch-werner.de/javasqlite/
+Patch0:                jnipath.patch
+BuildRequires: rpmbuild(macros) >= 1.553
+BuildRequires: jdk >= 1.5
+BuildRequires: jpackage-utils
+BuildRequires: rpm-javaprov
+BuildRequires: sqlite3-devel >= 3.4
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+javasqlite is a Java wrapper including a basic JDBC driver for the
+SQLite database engine. It is designed using JNI to interface to the
+SQLite API.
+
+%package javadoc
+Summary:       API documentation for %{name}
+Group:         Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description javadoc
+API documentation for %{name}.
+
+%prep
+%setup -q -n javasqlite-%{version}
+sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH0} | %{__patch} -p1
+
+%undos doc/ajhowto.txt
+f=ChangeLog; iconv -f iso-8859-1 -t utf-8 $f > $f.utf8; mv $f.utf8 $f
+rm doc/stylesheet.css # overrides javadoc's defaults
+
+%build
+%configure \
+       --with-jardir=%{_libdir}/%{name} \
+       --libdir=%{_libdir}/%{name} \
+       --without-sqlite
+
+# Java build not parallel clean
+%{__make} -j1 sqlite.jar
+%{__make}
+%{__make} javadoc JAVADOCLINK=%{_javadocdir}/java
+
+%if %{with tests}
+%{__make} test test3 testg \
+       JAVA_RUN=%java JAVAC=%javac 
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libsqlite_jni.la
+
+%if %{with javadoc}
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -a doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog license.terms
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/sqlite.jar
+%{_libdir}/%{name}/libsqlite_jni.so
+
+%files javadoc
+%defattr(644,root,root,755)
+%{_javadocdir}/%{name}
diff --git a/jnipath.patch b/jnipath.patch
new file mode 100644
index 0000000..0e78f92
--- /dev/null
+++ b/jnipath.patch
@@ -0,0 +1,14 @@
+Fedora specific, no need to send upstream.
+
+diff -up javasqlite-20090430/SQLite/Database.java~ 
javasqlite-20090430/SQLite/Database.java
+--- javasqlite-20090430/SQLite/Database.java~  2009-04-08 11:53:00.000000000 
+0300
++++ javasqlite-20090430/SQLite/Database.java   2009-05-01 00:59:29.000000000 
+0300
+@@ -868,7 +868,7 @@ public class Database {
+       try {
+           String path = System.getProperty("SQLite.library.path");
+           if (path == null || path.length() == 0) {
+-              System.loadLibrary("sqlite_jni");
++              System.load("@JNIPATH@/" + System.mapLibraryName("sqlite_jni"));
+           } else {
+               try {
+                   java.lang.reflect.Method mapLibraryName;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/java-sqlite.git/commitdiff/e966adc5c149f229384d659dd342c72666ca2998

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to