wok-6.x view sqlite/receipt @ rev 19774

some *-dev depend on pkg-config
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 21 15:50:51 2017 +0100 (2017-02-21)
parents 5636549f3f3d
children 294c02abfd9f
line source
1 # SliTaz package receipt.
3 PACKAGE="sqlite"
4 _realver=3081101
5 VERSION="${_realver:0:1}.${_realver:2:1}.${_realver:3:2}.${_realver:6:6}"
6 CATEGORY="office"
7 SHORT_DESC="Small SQL database engine."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="PublicDomain"
10 TARBALL="$PACKAGE-src-${_realver}.zip"
11 WEB_SITE="http://www.sqlite.org/"
12 WGET_URL="http://www.sqlite.org/2015/$TARBALL"
13 EXTRA_SOURCE_FILES="mysql2sqlite.sh"
14 HOST_ARCH="i486 arm"
16 DEPENDS="libsqlite"
17 BUILD_DEPENDS="tcl-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 case "$ARCH" in
23 arm*) ARCH_ARGS="--with-tcl=/cross/arm/sysroot/usr/lib" ;;
24 esac
25 [ -s "$SOURCES_REPOSITORY/mysql2sqlite.sh" ] ||
26 wget -O "$SOURCES_REPOSITORY/mysql2sqlite.sh" \
27 https://gist.github.com/esperlu/943776/raw/dd87f4088f6d5ec7563478f7a28a37ba02cf26e2/mysql2sqlite.sh
28 export CFLAGS="$CFLAGS -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE"
29 ./configure \
30 --prefix=/usr \
31 --disable-readline \
32 --enable-load-extension \
33 LDFLAGS="$LDFLAGS -ldl" \
34 $ARCH_ARGS \
35 $CONFIGURE_ARGS &&
36 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool &&
37 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool &&
38 make &&
39 make DESTDIR=$DESTDIR install
40 # compile lemon here instead of in lemon
41 if [ -f $src/lemon ]; then
42 rm $src/lemon
43 fi
44 cp $src/tool/lemon.c .
45 sed -i -e 's!lempar.c!/usr/share/lemon/lempar.c!' lemon.c
46 echo -n "Compiling lemon..."
47 gcc -o lemon lemon.c && status
48 mkdir -p $DESTDIR/usr/share/lemon
49 cp -a $src/lemon $DESTDIR/usr/bin
50 cp -a $src/lempar.c $DESTDIR/usr/share/lemon
51 }
53 # Rules to gen a SliTaz package suitable for Tazpkg.
54 genpkg_rules()
55 {
56 mkdir -p $fs/usr/bin
58 cp -a $install/usr/bin $fs/usr
59 cp "$SOURCES_REPOSITORY/mysql2sqlite.sh" $fs/usr/bin
60 chmod +x $fs/usr/bin/mysql2sqlite.sh
61 if [ -f $fs/usr/bin/lemon ]; then
62 rm -f $fs/usr/bin/lemon
63 fi
64 }