[Jpackage-commits] dist/sqljet/JPP-6 Makefile, NONE, 1.1 fetch-sqljet.sh, NONE, 1.1 sources, NONE, 1.1 sqljet-browser.desktop, NONE, 1.1 sqljet-browser.sh, NONE, 1.1 sqljet-javadoc.patch, NONE, 1.1 sqljet.spec, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Mon Feb 22 19:37:49 CET 2010


Update of /home/projects/jpackage/cvs/dist/sqljet/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv11075/JPP-6

Added Files:
	Makefile fetch-sqljet.sh sources sqljet-browser.desktop 
	sqljet-browser.sh sqljet-javadoc.patch sqljet.spec 
Log Message:
Import sqljet into JPP-6

--- NEW FILE: sqljet-browser.sh ---
#!/bin/bash
. /usr/share/java-utils/java-functions

MAIN_CLASS=org.tmatesoft.sqljet.browser.DBBrowser

set_classpath "sqljet sqljet-browser antlr3"

export CLASSPATH=$CLASSPATH:$(ls /usr/share/netbeans/platform*/modules/org-netbeans-swing-outline.jar)

run "$@"

--- NEW FILE: sqljet.spec ---
# Copyright (c) 2000-2010, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

Name:           sqljet
Version:        1.0.2
Release:        2%{?dist}
Summary:        Pure Java SQLite

Group:          Development/Libraries
License:        GPLv2
URL:            http://sqljet.com/
# Obtained by sh fetch-sqljet.sh
Source0:        %{name}-%{version}.tar.bz2
Source1:        fetch-sqljet.sh
Source2:        %{name}-browser.sh
Source3:        %{name}-browser.desktop
Patch0:         %{name}-javadoc.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  ant
BuildRequires:  antlr
BuildRequires:  antlr3
BuildRequires:  easymock2
BuildRequires:  netbeans-platform
BuildRequires:  java-devel >= 1.6
BuildRequires:  junit4
BuildRequires:  desktop-file-utils
Requires:       antlr3

BuildArch: noarch

%description
SQLJet is an independent pure Java implementation of a popular SQLite database
management system. SQLJet is a software library that provides API that enables
Java application to read and modify SQLite databases.

%package        browser
Group:          Development/Tools
Summary:        SQLJet database browser
Requires:       %{name} = %{version}
Requires:       netbeans-platform

%description    browser
Utility for browsing SQLJet/SQLite databases.

%package        javadoc
Group:          Documentation
Summary:        Javadoc for %{name}
Requires:       jpackage-utils

%description    javadoc
API documentation for %{name}.

%prep
%setup -q
%patch0

find \( -name '*.class' -o -name '*.jar' \) -delete 

pushd lib
ln -s %{_javadir}/antlr3.jar antlr-runtime-3.1.3.jar
popd
pushd sqljet-examples/browser/lib
ln -s %{_datadir}/netbeans/platform*/modules/org-netbeans-swing-outline.jar org-netbeans-swing-outline.jar
popd


%build
export CLASSPATH=$(build-classpath antlr3 antlr stringtemplate easymock2 junit4)

ant jars osgi javadoc

jar umf sqljet/osgi/MANIFEST.MF build/sqljet.jar

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_javadir}
cp -p  build/sqljet.jar  \
%{buildroot}%{_javadir}/%{name}-%{version}.jar
cp -p  build/sqljet-browser.jar  \
%{buildroot}%{_javadir}/%{name}-browser-%{version}.jar

(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; \
    do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -rp build/javadoc/* \
%{buildroot}%{_javadocdir}/%{name}

install -d %{buildroot}%{_bindir}
install -m 755 %{SOURCE2} %{buildroot}%{_bindir}/%{name}-browser

desktop-file-install                                    \
--vendor=jpackage \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \
%{SOURCE3}

desktop-file-validate %{buildroot}/%{_datadir}/applications/jpackage-sqljet-browser.desktop

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYING INSTALL README.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar

%files browser
%defattr(-,root,root,-)
%{_javadir}/%{name}-browser.jar
%{_javadir}/%{name}-browser-%{version}.jar
%{_bindir}/%{name}-browser
%{_datadir}/applications/jpackage-%{name}-browser.desktop

%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/*

%changelog
* Mon Feb 22 2010 Ralph Apel <r.apel at r-apel.de> 1.0.2-2
- Adapt to JPP6
- Try to use any netbeans-platform
- Add antlr3 to browser classpath
- Fix javadoc location

* Thu Jan 14 2010 Alexander Kurtakov <akurtako at redhat.com> 1.0.2-1
- Update to 1.0.2.

* Thu Dec 3 2009 Alexander Kurtakov <akurtako at redhat.com> 1.0.1-3
- Require antlr3.

* Mon Nov 30 2009 Alexander Kurtakov <akurtako at redhat.com> 1.0.1-2
- Fix build and review comments.

* Thu Nov 26 2009 Alexander Kurtakov <akurtako at redhat.com> 1.0.1-1
- Initial package.

--- NEW FILE: Makefile ---
# Makefile for source rpm: sqljet
# $Id: Makefile,v 1.1 2010/02/22 18:37:47 jpackage Exp $
NAME := sqljet
SPECFILE = $(firstword $(wildcard *.spec))

define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef

MAKEFILE_COMMON := $(shell $(find-makefile-common))

ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef

MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif

include $(MAKEFILE_COMMON)

--- NEW FILE: sources ---
b61f286dec0b4e0fdf573fc30bead290  sqljet-1.0.2.tar.bz2

--- NEW FILE: sqljet-javadoc.patch ---
--- build.xml.orig	2009-11-18 03:30:24.000000000 +0200
+++ build.xml	2009-11-26 13:12:39.562877717 +0200
@@ -340,4 +340,23 @@ public class SqlParser</replacevalue>
 			<sysproperty key="SqlJetBtreeTableTest.REPEATS_COUNT" value="100" />
 		</junit>
 	</target>
+ <target name="jars" depends="clean, compile, compile-examples">
+        <mkdir dir="build" />
+    	<!-- update svnkit.build.properties here -->
+    	<antcall target="init-build.number"/>
+
+	<jar destfile="build/sqljet.jar">
+            <fileset dir="sqljet/bin">
+                <include name="**/**"/>
+            </fileset>
+            <fileset dir="build">
+                <include name="sqljet.build.properties"/>
+            </fileset>
+        </jar>
+	<jar destfile="build/sqljet-browser.jar" >
+            <fileset dir="sqljet-examples/browser/bin">
+                <include name="**/**"/>
+            </fileset>
+        </jar>
+        </target>
 </project>
\ No newline at end of file

--- NEW FILE: fetch-sqljet.sh ---
#! /bin/sh

version=1.0.2
mkdir fetch
cd fetch
svn export http://svn.sqljet.com/repos/sqljet/tags/$version sqljet-$version

tar cfj sqljet-$version.tar.bz2 sqljet-$version

cd ..

--- NEW FILE: sqljet-browser.desktop ---
[Desktop Entry]
Name=sqljet-browser
GenericName=SQLJet brower
Comment=Java browser for sqlite files
Exec=sqljet-browser
Terminal=false
Type=Application
Categories=Development;Database




More information about the JPackage-commits mailing list