summaryrefslogtreecommitdiff
path: root/sqlite/sqlite_2.8.15.oe
blob: 2579260808b12ae4a10eda5a3a9afe0f146ceafc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
DESCRIPTION = "An Embeddable SQL Database Engine"
HOMEPAGE = "http://www.sqlite.org/"
SECTION = "libs"
PRIORITY = "optional"
DEPENDS = "readline ncurses"
LICENSE = "PD"
PR = "r2"

SRC_URI = "http://www.hwaci.com/sw/sqlite/sqlite-${PV}.tar.gz \
	   file://main.mk"
S = "${WORKDIR}/sqlite"

SOURCES = "attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o expr.o func.o hash.o \
           insert.o main.o opcodes.o os.o pager.o parse.o pragma.o printf.o random.o select.o table.o \
           tokenize.o trigger.o update.o util.o vacuum.o vdbe.o vdbeaux.o where.o"

inherit autotools

do_configure() {
	install -m 0644 ${WORKDIR}/main.mk ${S}/
}

do_compile() {
	oe_runmake -f Makefile.linux-gcc \
                   TOP="${S}" \
                   BCC="${BUILD_CC}" \
                   TCC="${CC}" \
                   OPTS="-fPIC" \
                   TCL_FLAGS= LIBTCL= \
                   READLINE_FLAGS="-DHAVE_READLINE=1 -I${STAGING_INCDIR}" \
                   LIBREADLINE="-L. -L${STAGING_LIBDIR} -lreadline -lncurses"
}

do_stage() {
	install -m 0755 libsqlite.so ${STAGING_LIBDIR}/libsqlite.so.0.8.6
        ln -sf libsqlite.so.0.8.6 ${STAGING_LIBDIR}/libsqlite.so
        ln -sf libsqlite.so.0.8.6 ${STAGING_LIBDIR}/libsqlite.so.0
        ln -sf libsqlite.so.0.8.6 ${STAGING_LIBDIR}/libsqlite.so.0.8
	install -m 0644 sqlite.h ${STAGING_INCDIR}
}

do_install() {
	install -d ${D}/${libdir} ${D}/${bindir}
	install sqlite ${D}/${bindir}
	install -m 0755 libsqlite.so ${D}/${libdir}/libsqlite.so.0.8.6
	ln -sf libsqlite.so.0.8.6 ${D}/${libdir}/libsqlite.so
        ln -sf libsqlite.so.0.8.6 ${D}/${libdir}/libsqlite.so.0
        ln -sf libsqlite.so.0.8.6 ${D}/${libdir}/libsqlite.so.0.8
}

PACKAGES += "${PN}-bin"
FILES_${PN}-bin = "${bindir}"
FILES_${PN} = "${libdir}/*.so.*"