wok annotate sqlite/receipt @ rev 24074

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 08 09:18:48 2021 +0000 (2021-07-08)
parents 3ae2d1f7b186
children 80d30b02c821
rev   line source
pankso@6 1 # SliTaz package receipt.
pankso@6 2
pankso@6 3 PACKAGE="sqlite"
pascal@23836 4 _realver="3320100"
pascal@23686 5 VERSION="$(printf "%d.%d.%d" ${_realver:0:1} ${_realver:1:2} ${_realver:3:2})"
pankso@205 6 CATEGORY="office"
pankso@6 7 SHORT_DESC="Small SQL database engine."
pankso@6 8 MAINTAINER="pankso@slitaz.org"
pascal@15379 9 LICENSE="PublicDomain"
Hans-G?nter@21949 10 WEB_SITE="https://www.sqlite.org/index.html"
Hans-G?nter@21949 11
slaxemulator@12422 12 TARBALL="$PACKAGE-src-${_realver}.zip"
Hans-G?nter@23663 13 WGET_URL="https://www.sqlite.org/2020/$TARBALL"
Hans-G?nter@21949 14
pascal@18930 15 EXTRA_SOURCE_FILES="mysql2sqlite.sh"
pascal@15379 16
erjo@8741 17 DEPENDS="libsqlite"
pascal@18650 18 BUILD_DEPENDS="tcl-dev"
pankso@6 19
Hans-G?nter@21949 20 HOST_ARCH="i486 arm"
Hans-G?nter@21949 21
pascal@24074 22 current_version()
pascal@24074 23 {
pascal@24074 24 wget -O - $WGET_URL 2>/dev/null | \
pascal@24074 25 sed '/Version [0-9]/!d;s|.*Version \(.*\)<.*|\1|' | sed q
pascal@24074 26 }
pascal@24074 27
pankso@6 28 # Rules to configure and make the package.
pankso@6 29 compile_rules()
pankso@6 30 {
pascal@19120 31 case "$ARCH" in
Hans-G?nter@23663 32 arm*)
Hans-G?nter@23663 33 ARCH_ARGS="--with-tcl=/cross/arm/sysroot/usr/lib" ;;
pascal@19120 34 esac
Hans-G?nter@23663 35
pascal@18930 36 [ -s "$SOURCES_REPOSITORY/mysql2sqlite.sh" ] ||
pascal@18930 37 wget -O "$SOURCES_REPOSITORY/mysql2sqlite.sh" \
pascal@18930 38 https://gist.github.com/esperlu/943776/raw/dd87f4088f6d5ec7563478f7a28a37ba02cf26e2/mysql2sqlite.sh
Hans-G?nter@21949 39
devl547@19901 40 export CFLAGS="$CFLAGS -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DTCLSH=1"
Hans-G?nter@23663 41
Hans-G?nter@21949 42 ./configure \
Hans-G?nter@21949 43 --prefix=/usr \
Hans-G?nter@21949 44 --disable-readline \
Hans-G?nter@21949 45 --enable-load-extension \
Hans-G?nter@21949 46 LDFLAGS="$LDFLAGS -ldl" \
Hans-G?nter@21949 47 $ARCH_ARGS \
pankso@3156 48 $CONFIGURE_ARGS &&
Hans-G?nter@21949 49 make &&
Hans-G?nter@21949 50 make install
pankso@6 51 }
pankso@6 52
pankso@6 53 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@6 54 genpkg_rules()
pankso@6 55 {
pascal@18930 56 mkdir -p $fs/usr/bin
erjo@8741 57
Hans-G?nter@21949 58 cp -a $install/usr/bin $fs/usr
Hans-G?nter@21949 59 cp "$SOURCES_REPOSITORY/mysql2sqlite.sh" $fs/usr/bin
Hans-G?nter@21949 60
Hans-G?nter@23663 61 chmod +x $fs/usr/bin/mysql2sqlite.sh
Hans-G?nter@21949 62 if [ -f $fs/usr/bin/lemon ]
Hans-G?nter@21949 63 then
gokhlayeh@11392 64 rm -f $fs/usr/bin/lemon
gokhlayeh@11392 65 fi
pankso@6 66 }