wok-next view sqlite3/receipt @ rev 20827
new tor: 0.3.3.7
author | Erkan Yilmaz <erkan@slitaz.org> |
---|---|
date | Thu Jun 14 10:13:14 2018 +0000 (2018-06-14) |
parents | d43bf7aae921 |
children | fa61cfb16a25 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="sqlite3"
4 VERSION="3.19.2"
5 version="3190200"
6 CATEGORY="database"
7 SHORT_DESC="Small SQL database engine"
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="PublicDomain"
10 WEB_SITE="https://www.sqlite.org/"
12 TARBALL="sqlite-$VERSION.zip"
13 WGET_URL="https://www.sqlite.org/2017/sqlite-src-$version.zip"
15 EXTRA_SOURCE_FILES="mysql2sqlite.sh"
17 BUILD_DEPENDS="tcl-dev"
18 SPLIT="libsqlite3 libsqlite3-tcl lemon sqlite3-dev"
20 compile_rules() {
21 case "$ARCH" in
22 arm*) ARCH_ARGS="--with-tcl=/cross/arm/sysroot/usr/lib" ;;
23 esac
25 [ -s "$SRC/mysql2sqlite.sh" ] ||
26 wget -O "$SRC/mysql2sqlite.sh" \
27 https://gist.github.com/esperlu/943776/raw/dd87f4088f6d5ec7563478f7a28a37ba02cf26e2/mysql2sqlite.sh
29 export CFLAGS="$CFLAGS -DSQLITE_ENABLE_FTS3=1 \
30 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
31 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1"
33 ./configure \
34 --disable-static \
35 --disable-readline \
36 --enable-load-extension \
37 LDFLAGS="$LDFLAGS -ldl" \
38 $ARCH_ARGS \
39 $CONFIGURE_ARGS &&
40 fix libtool &&
41 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool &&
42 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool &&
43 make &&
44 make DESTDIR=$DESTDIR install
46 # compiling lemon
47 if [ -f $src/lemon ]; then
48 rm $src/lemon
49 fi
50 cp $src/tool/lemon.c .
51 sed -i -e 's!lempar.c!/usr/share/lemon/lempar.c!' lemon.c
52 echo -n "Compiling lemon..."
53 gcc -o lemon lemon.c && status
54 mkdir -p $install/usr/share/lemon
55 cp -a $src/lemon $install/usr/bin
56 cp -a $src/lempar.c $install/usr/share/lemon
58 cp "$SRC/mysql2sqlite.sh" $install/usr/bin
59 chmod +x $install/usr/bin/mysql2sqlite.sh
60 }
62 genpkg_rules() {
63 case $PACKAGE in
64 sqlite3)
65 copy sqlite3 mysql2sqlite.sh
66 DEPENDS="libsqlite3"
67 PROVIDE="sqlite"
68 ;;
69 libsqlite3)
70 copy libsqlite3.so*
71 CAT="database|library"
72 DEPENDS=" "
73 PROVIDE="libsqlite"
74 ;;
75 libsqlite3-tcl)
76 copy tcl8.6/
77 CAT="database|TCL library"
78 DEPENDS="libsqlite3 tcl"
79 PROVIDE="libsqlite-tcl"
80 ;;
81 lemon)
82 copy lemon lempar.c
83 CAT="system-tools|The LEMON Parser Generator"
84 DEPENDS=" "
85 ;;
86 sqlite3-dev)
87 copy @dev
88 DEPENDS="sqlite3 libsqlite3 libsqlite3-tcl lemon"
89 PROVIDE="sqlite-dev"
90 ;;
91 esac
92 }