blob: 6767e550f7b80b133403aafe163ea1027f2668f3 (
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
|
DESCRIPTION = "A Ruby library that provides a class for using RS-232 serial ports"
HOMEPAGE = "https://github.com/hparra/ruby-serialport"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
SECTION = "console/utils"
PRIORITY = "optional"
DEPENDS = "ruby"
PR = "r2"
# tag v1.1.0
SRCREV = "709e385f6d20aaadc7f3252af59250336d27e607"
SRC_URI = "git://github.com/hparra/ruby-serialport.git;protocol=git"
S = "${WORKDIR}/git"
B = "${S}"
do_compile() {
ls -d ${STAGING_INCDIR}/ruby-* >/tmp/ruby.txt
rp=$(ls -d ${STAGING_INCDIR}/ruby-* | head -1)
echo ${rp} >/tmp/ruby2.txt
${CC} -v ${CFLAGS} ${LDFLAGS} -Iext/native -I${rp} -I${rp}/arm-linux-gnueabi -c ext/native/*.c
${CC} -v ${CFLAGS} ${LDFLAGS} --shared -o ext/native/serialport.so serialport.o posix_serialport_impl.o
}
do_install() {
install -d ${D}${libdir}/ruby/serialport
install lib/serialport.rb ${D}${libdir}/ruby/serialport.rb
install ext/native/serialport.so -t ${D}${libdir}/ruby
}
FILES_${PN} = "${libdir}/ruby/serialport*"
FILES_${PN}-dbg += "${libdir}/ruby/.debug"
|