wok-next view sqlite3/receipt @ rev 20066
qtwebkit : up compile_rules
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Tue Oct 24 16:18:07 2017 +0200 (2017-10-24) |
parents | |
children | 0e7893ac206d |
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/"
11 HOST_ARCH="i486 arm"
13 TARBALL="sqlite-$VERSION.zip"
14 WGET_URL="https://www.sqlite.org/2017/sqlite-src-$version.zip"
16 EXTRA_SOURCE_FILES="mysql2sqlite.sh"
18 BUILD_DEPENDS="tcl-dev"
19 SPLIT="libsqlite3 libsqlite3-tcl lemon sqlite3-dev"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 case "$ARCH" in
25 arm*) ARCH_ARGS="--with-tcl=/cross/arm/sysroot/usr/lib" ;;
26 esac
28 [ -s "$SOURCES_REPOSITORY/mysql2sqlite.sh" ] ||
29 wget -O "$SOURCES_REPOSITORY/mysql2sqlite.sh" \
30 https://gist.github.com/esperlu/943776/raw/dd87f4088f6d5ec7563478f7a28a37ba02cf26e2/mysql2sqlite.sh
32 export CFLAGS="$CFLAGS -DSQLITE_ENABLE_FTS3=1 \
33 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
34 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1"
36 ./configure \
37 --disable-static \
38 --disable-readline \
39 --enable-load-extension \
40 LDFLAGS="$LDFLAGS -ldl" \
41 $ARCH_ARGS \
42 $CONFIGURE_ARGS &&
43 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool &&
44 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool &&
45 make &&
46 make DESTDIR=$DESTDIR install
48 # compiling lemon
49 if [ -f $src/lemon ]; then
50 rm $src/lemon
51 fi
52 cp $src/tool/lemon.c .
53 sed -i -e 's!lempar.c!/usr/share/lemon/lempar.c!' lemon.c
54 echo -n "Compiling lemon..."
55 gcc -o lemon lemon.c && status
56 mkdir -p $install/usr/share/lemon
57 cp -a $src/lemon $install/usr/bin
58 cp -a $src/lempar.c $install/usr/share/lemon
60 cp "$SOURCES_REPOSITORY/mysql2sqlite.sh" $install/usr/bin
61 chmod +x $install/usr/bin/mysql2sqlite.sh
62 }
64 # Rules to gen a SliTaz package suitable for Tazpkg.
65 genpkg_rules()
66 {
67 case $PACKAGE in
68 sqlite3)
69 copy sqlite3 mysql2sqlite.sh
70 DEPENDS="libsqlite3"
71 PROVIDE="sqlite"
72 ;;
73 libsqlite3)
74 copy libsqlite3.so*
75 CAT="database|library"
76 DEPENDS=" "
77 PROVIDE="libsqlite"
78 ;;
79 libsqlite3-tcl)
80 copy tcl8.6/
81 CAT="database|TCL library"
82 DEPENDS="libsqlite3 tcl"
83 PROVIDE="libsqlite-tcl"
84 ;;
85 lemon)
86 copy lemon lempar.c
87 CAT="system-tools|The LEMON Parser Generator"
88 DEPENDS=" "
89 ;;
90 sqlite3-dev)
91 copy @dev
92 DEPENDS="sqlite3 libsqlite3 libsqlite3-tcl lemon"
93 PROVIDE="sqlite-dev"
94 ;;
95 esac
96 }