wok-next view sqlite/receipt @ rev 19659
Up xorg-xf86-video-fbdev, xorg-xf86-video-intel
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun Mar 05 05:50:58 2017 +0200 (2017-03-05) |
parents | 4eab61ea2c5a |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="sqlite"
4 VERSION="3.16.1"
5 version="3160100"
6 CATEGORY="office"
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="$PACKAGE-$VERSION.zip"
14 WGET_URL="https://www.sqlite.org/2017/sqlite-src-$version.zip"
16 EXTRA_SOURCE_FILES="mysql2sqlite.sh"
18 DEPENDS="libsqlite"
19 BUILD_DEPENDS="tcl-dev"
20 SPLIT="libsqlite libsqlite-tcl lemon"
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 case "$ARCH" in
26 arm*) ARCH_ARGS="--with-tcl=/cross/arm/sysroot/usr/lib" ;;
27 esac
29 [ -s "$SOURCES_REPOSITORY/mysql2sqlite.sh" ] ||
30 wget -O "$SOURCES_REPOSITORY/mysql2sqlite.sh" \
31 https://gist.github.com/esperlu/943776/raw/dd87f4088f6d5ec7563478f7a28a37ba02cf26e2/mysql2sqlite.sh
33 export CFLAGS="$CFLAGS -DSQLITE_ENABLE_FTS3=1 \
34 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
35 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1"
37 ./configure \
38 --disable-static \
39 --disable-readline \
40 --enable-load-extension \
41 LDFLAGS="$LDFLAGS -ldl" \
42 $ARCH_ARGS \
43 $CONFIGURE_ARGS &&
44 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool &&
45 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool &&
46 make &&
47 make DESTDIR=$DESTDIR install
49 # compile lemon here instead of in lemon
50 if [ -f $src/lemon ]; then
51 rm $src/lemon
52 fi
53 cp $src/tool/lemon.c .
54 sed -i -e 's!lempar.c!/usr/share/lemon/lempar.c!' lemon.c
55 echo -n "Compiling lemon..."
56 gcc -o lemon lemon.c && status
57 mkdir -p $DESTDIR/usr/share/lemon
58 cp -a $src/lemon $DESTDIR/usr/bin
59 cp -a $src/lempar.c $DESTDIR/usr/share/lemon
60 }
62 # Rules to gen a SliTaz package suitable for Tazpkg.
63 genpkg_rules()
64 {
65 cook_copy_files sqlite3
67 cp "$SOURCES_REPOSITORY/mysql2sqlite.sh" $fs/usr/bin
68 chmod +x $fs/usr/bin/mysql2sqlite.sh
69 }