gunnar: server/sqlite Makefile, 1.1, 1.2 sqlite.patch.v3, 1.1, 1.2 sqlite.spec, 1.1, 1.2

cvs at kolab.org cvs at kolab.org
Mon Oct 27 18:21:41 CET 2008


Author: gunnar

Update of /kolabrepository/server/sqlite
In directory doto:/tmp/cvs-serv27071

Modified Files:
	Makefile sqlite.patch.v3 sqlite.spec 
Log Message:
A joined version of sqlite2/3.

Index: Makefile
===================================================================
RCS file: /kolabrepository/server/sqlite/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Makefile	19 Sep 2008 20:54:56 -0000	1.1
+++ Makefile	27 Oct 2008 17:21:39 -0000	1.2
@@ -1,7 +1,8 @@
 NAME = sqlite
 PACKAGE = $(NAME)
-VERSION = $(shell grep "^Version:" *.spec | sed -e "s/^Version:\s*\([0-9.]*\).*/\1/")
-RELEASE = $(shell grep "^Release:" *.spec | sed -e "s/^Release:\s*\([0-9]*\).*/\1/")
+VERSION3 = $(shell grep "define *V_v3" sqlite.spec | sed -e "s/.*V_v3\s*\([0-9.]*\).*/\1/")
+VERSION2 = $(shell grep "define *V_v2" sqlite.spec | sed -e "s/.*V_v2\s*\([0-9.]*\).*/\1/")
+RELEASE = $(shell grep "^Release:" sqlite.spec | sed -e "s/^Release:\s*\([0-9]*\).*/\1/")
 KOLABRELEASE = $(RELEASE)
 
 ifeq "x$(RPM)" "x"
@@ -17,27 +18,29 @@
   KOLABRPMTMP = $(HOME)/RPM/TMP
 endif
 
-SOURCE_0=http://www.sqlite.org/sqlite-2.8.17.tar.gz
+SOURCE_0=http://www.sqlite.org/sqlite-$(VERSION2).tar.gz
+SOURCE_1=http://www.sqlite.org/sqlite-$(VERSION3).tar.gz
 
 .PHONY: all
-all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+all: $(PACKAGE)-$(VERSION3)-$(RELEASE).src.rpm
 
 .PHONY: dist
 dist: all
-	cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm ../stage/
+	cp $(PACKAGE)-$(VERSION3)-$(RELEASE).src.rpm ../stage/
 
 .PHONY: clean
 clean:
 	rm -rf $(KOLABRPMTMP)/$(NAME)*
 	rm -rf $(KOLABRPMTMP)/$(PACKAGE)
-	rm -rf $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+	rm -rf $(PACKAGE)-$(VERSION3)-$(RELEASE).src.rpm
 	rm -rf *~
 
-$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: Makefile $(PACKAGE).spec
+$(PACKAGE)-$(VERSION3)-$(RELEASE).src.rpm: Makefile $(PACKAGE).spec
 	test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
 	cd $(KOLABRPMSRC)/$(PACKAGE) && wget -c "$(SOURCE_0)"
+	cd $(KOLABRPMSRC)/$(PACKAGE) && wget -c "$(SOURCE_1)"
 
-	cp $(PACKAGE).spec $(PACKAGE).patch $(KOLABRPMSRC)/$(PACKAGE)
+	cp $(PACKAGE).spec $(PACKAGE).patch.* $(KOLABRPMSRC)/$(PACKAGE)
 	cd $(KOLABRPMSRC)/$(PACKAGE) && $(RPM) -ba $(PACKAGE).spec --define 'with_pth no'
 
-	cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .
+	cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION3)-$(RELEASE).src.rpm .

Index: sqlite.patch.v3
===================================================================
RCS file: /kolabrepository/server/sqlite/sqlite.patch.v3,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sqlite.patch.v3	27 Oct 2008 16:29:32 -0000	1.1
+++ sqlite.patch.v3	27 Oct 2008 17:21:39 -0000	1.2
@@ -1,6 +1,6 @@
-Index: Makefile.in
---- Makefile.in.orig	2008-10-14 20:07:37 +0200
-+++ Makefile.in	2008-10-15 19:59:08 +0200
+Index: sqlite-3.6.4/Makefile.in
+--- sqlite-3.6.4/Makefile.in.orig	2008-10-14 20:07:37 +0200
++++ sqlite-3.6.4/Makefile.in	2008-10-15 19:59:08 +0200
 @@ -179,6 +179,30 @@
  LIBOBJ = $(OBJS$(USE_AMALGAMATION))
  
@@ -71,9 +71,9 @@
 +rtree.lo:	$(TOP)/ext/rtree/rtree.c $(HDR)
 +	$(LTCOMPILE) -c $(TOP)/ext/rtree/rtree.c
 +
-Index: sqlite3.pc.in
---- sqlite3.pc.in.orig	2008-10-14 20:07:39 +0200
-+++ sqlite3.pc.in	2008-10-15 19:59:34 +0200
+Index: sqlite-3.6.4/sqlite3.pc.in
+--- sqlite-3.6.4/sqlite3.pc.in.orig	2008-10-14 20:07:39 +0200
++++ sqlite-3.6.4/sqlite3.pc.in	2008-10-15 19:59:34 +0200
 @@ -8,6 +8,5 @@
  Name: SQLite
  Description: SQL database engine

Index: sqlite.spec
===================================================================
RCS file: /kolabrepository/server/sqlite/sqlite.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sqlite.spec	19 Sep 2008 20:54:56 -0000	1.1
+++ sqlite.spec	27 Oct 2008 17:21:39 -0000	1.2
@@ -22,7 +22,9 @@
 ##  SUCH DAMAGE.
 ##
 
-%define         V_Version 2.8.17
+#   package version
+%define       V_v3   3.6.4
+%define       V_v2   2.8.17
 
 #   package information
 Name:         sqlite
@@ -34,18 +36,22 @@
 Class:        BASE
 Group:        Database
 License:      PD
-Version:      2.8.17
-Release:      20080919
+Version:      %{V_v3}
+Release:      20081027
 
 #   package options
 %option       with_utf8            no
 %option       with_assert          no
 %option       with_readline        no
 %option       with_threads         no
+%option       with_fts3            no
+%option       with_rtree           no
 
 #   list of sources
-Source0:      http://www.sqlite.org/sqlite-%{V_Version}.tar.gz
-Patch0:       sqlite.patch
+Source0:      http://www.sqlite.org/sqlite-%{V_v3}.tar.gz
+Source1:      http://www.sqlite.org/sqlite-%{V_v2}.tar.gz
+Patch0:       sqlite.patch.v2
+Patch1:       sqlite.patch.v3
 
 #   build information
 Prefix:       %{l_prefix}
@@ -70,58 +76,109 @@
     the server. The SQLite library reads and writes directly to and from
     the database files on disk.
 
+    This package contains both SQLite 3 (%{V_v3}) and optionally the old
+    SQLite 2 (%{V_v2}). Notice that the two are API and database format
+    incompatible but can be used in parallel (on different databases).
+    Additionally, this package optionally provides the SQLite ODBC driver.
 
 %prep
     %setup -q -c
-    %patch -p0
+    %setup -q -D -T -a 1
+    %patch -p0 -P 0
+    %patch -p0 -P 1
 
     #   post-adjust sources
-    chmod a+x sqlite-%{V_Version}/install-sh
+    chmod a+x sqlite-%{V_v2}/install-sh
     %{l_shtool} subst \
         -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
-        sqlite-%{V_Version}/configure
+        sqlite-%{V_v3}/configure sqlite-%{V_v2}/configure
 
 %build
-    #   configure and build SQLite 3 and optionally SQLite 2
-    for v in %{V_Version}; do
-        ( cd sqlite-$v
-          CC="%{l_cc}"
-          export CC
-          CPPFLAGS="%{l_cppflags}"
-          export CPPFLAGS
-          CFLAGS="%{l_cflags -O}"
-          export CFLAGS
-          LDFLAGS="%{l_ldflags}"
-          export LDFLAGS
-          LIBS=""
-          export LIBS
+    #   configure and build SQLite 3 and SQLite 2
+    cd sqlite-%{V_v2}
+    CC="%{l_cc}"
+    export CC
+    CPPFLAGS="%{l_cppflags}"
+    export CPPFLAGS
+    CFLAGS="%{l_cflags -O}"
+    export CFLAGS
+    LDFLAGS="%{l_ldflags}"
+    export LDFLAGS
+    LIBS=""
+    export LIBS
 %if "%{with_assert}" == "no"
-          CFLAGS="$CFLAGS -DNDEBUG=1"
+    CFLAGS="$CFLAGS -DNDEBUG=1"
 %endif
 %if "%{with_readline}" == "yes"
-          config_TARGET_READLINE_INC="%{l_cppflags readline} `%{l_prefix}/bin/pkg-config --cflags readline`"
-          export config_TARGET_READLINE_INC
-          config_TARGET_READLINE_LIBS="%{l_ldflags} `%{l_prefix}/bin/pkg-config --libs readline`"
-          export config_TARGET_READLINE_LIBS
+    config_TARGET_READLINE_INC="%{l_cppflags readline} `%{l_prefix}/bin/pkg-config --cflags readline`"
+    export config_TARGET_READLINE_INC
+    config_TARGET_READLINE_LIBS="%{l_ldflags} `%{l_prefix}/bin/pkg-config --libs readline`"
+    export config_TARGET_READLINE_LIBS
 %endif
-          ./configure \
-              --prefix=%{l_prefix} \
+    ./configure \
+        --prefix=%{l_prefix} \
 %if "%{with_utf8}" == "yes"
-              --enable-utf8 \
+        --enable-utf8 \
 %endif
 %if "%{with_threads}" == "yes"
-              --enable-threadsafe \
+        --enable-threadsafe \
 %endif
-              --disable-shared
+        --disable-shared
 %if "%{with_assert}" == "yes"
-          %{l_shtool} subst \
-              -e 's;-DNDEBUG;;' \
-              Makefile
+    %{l_shtool} subst \
+        -e 's;-DNDEBUG;;' \
+        Makefile
 %endif
-          MFLAGS=""
-          %{l_make} %{l_mflags -O} $MFLAGS
-        ) || exit $?
-    done
+    MFLAGS=""
+    %{l_make} %{l_mflags -O} $MFLAGS
+    cd ..
+
+
+    #   configure and build SQLite
+    cd sqlite-%{V_v3}
+    CC="%{l_cc}"
+    CFLAGS="%{l_cflags -O}"
+    CPPFLAGS="-I. %{l_cppflags}"
+    LDFLAGS="%{l_ldflags}"
+    LIBS="-lm"
+    export CC
+    export CPPFLAGS
+    export CFLAGS
+    export LDFLAGS
+    export LIBS
+    GREP="grep" \
+    ./configure \
+        --prefix=%{l_prefix} \
+%if "%{with_threads}" == "yes"
+        --enable-threadsafe \
+%else
+        --disable-threadsafe \
+%endif
+%if "%{with_readline}" == "yes"
+        --enable-readline \
+        --with-readline-lib="`%{l_prefix}/bin/pkg-config --libs readline`" \
+        --with-readline-inc="`%{l_prefix}/bin/pkg-config --cflags readline`" \
+%else
+        --disable-readline \
+%endif
+%if "%{with_debug}" == "yes"
+        --enable-debug \
+%else
+        --disable-debug \
+%endif
+        --disable-tcl \
+        --disable-amalgamation \
+        --disable-shared
+    MFLAGS=""
+%if "%{with_fts3}" == "yes"
+    MFLAGS="$MFLAGS FTS3=1"
+%endif
+%if "%{with_rtree}" == "yes"
+    MFLAGS="$MFLAGS RTREE=1"
+%endif
+    %{l_make} %{l_mflags -O} $MFLAGS
+    cd ..
+
 
 %install
     #   create installation hierarchy
@@ -132,7 +189,16 @@
         $RPM_BUILD_ROOT%{l_prefix}/include \
         $RPM_BUILD_ROOT%{l_prefix}/man/man1
 
-    ( cd sqlite-%{V_Version}
+    #   install SQLite 3
+    ( cd sqlite-%{V_v3}
+      %{l_make} %{l_mflags} install \
+          prefix=$RPM_BUILD_ROOT%{l_prefix}
+      %{l_shtool} install -c -m 644 \
+          sqlite3.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/sqlite3.1
+    ) || exit $?
+
+    #   install SQLite 2
+    ( cd sqlite-%{V_v2}
       %{l_make} %{l_mflags} install \
           prefix=$RPM_BUILD_ROOT%{l_prefix}
       %{l_shtool} install -c -m 644 \





More information about the commits mailing list