summaryrefslogtreecommitdiff
path: root/recipes-ruby/ruby-sqlite3/ruby-sqlite3_1.3.13.bb
blob: fa1ff9ed3d50fdc27ef7d57eb3f5069a2095b4da (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
DESCRIPTION = "Ruby bindings for the SQLite3 embedded database"
HOMEPAGE = "https://github.com/sparklemotion/sqlite3-ruby"
LICENSE = "custom-freely-distributable"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f24ce0d57c8f8576a36e2803d35bcfec"
SECTION = "console/utils"
PRIORITY = "optional"
DEPENDS = "ruby sqlite3"

PR = "r0"

SRC_URI = "git://github.com/sparklemotion/sqlite3-ruby.git;tag=v${PV};branch=1-3-stable;protocol=git"

S = "${WORKDIR}/git"
B = "${S}"

# RUBY_VERSION
do_compile() {
  fn=$(ls ${STAGING_INCDIR}/ruby-*/ruby.h | head -1)
  pn=$(dirname $fn)
  pn2=$(ls -d ${STAGING_INCDIR}/ruby-*/arm-linux-*)
  ${CC} ${CFLAGS} ${LDFLAGS} -Iext/sqlite3 -Iext/native -I${pn} -I${pn2} -c ext/sqlite3/*.c
  ${CC} ${CFLAGS} ${LDFLAGS} --shared -o ext/sqlite3/sqlite3_native.so *.o -lsqlite3
}

do_install() {
  install -d ${D}${libdir}/ruby ${D}${libdir}/ruby/sqlite3
  install lib/sqlite3.rb ${D}${libdir}/ruby/sqlite3.rb
  install lib/sqlite3/* ext/sqlite3/sqlite3_native.so -t ${D}${libdir}/ruby/sqlite3
}

FILES_${PN} = "${libdir}/ruby/sqlite3*"
FILES_${PN}-dbg += "${libdir}/ruby/sqlite3/.debug*"