Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / bitlbee / bitlbee_1.0.4.bb
1 DESCRIPTION = "Bitlbee is an IRC to IM gateway that support multiple IM protocols."
2 HOMEPAGE = "http://www.bitlbee.org/"
3 SECTION = "console/network"
4 LICENSE = "GPLv2"
5 DEPENDS = "glib-2.0 gnutls"
6 FILE_PR = "r0"
7
8 SRC_URI = "http://get.bitlbee.org/src/${P}.tar.gz \
9            file://configure.patch;patch=1 \
10            file://init-script"
11
12 S = "${WORKDIR}/bitlbee-${PV}"
13
14 EXTRA_OECONF = "--prefix=/usr \
15                 --datadir=/usr/share/bitlbee \
16                 --etcdir=/etc/bitlbee \
17                 --oscar=0 \
18                 --cpu=${TARGET_ARCH}"
19
20 do_configure () {
21     # NOTE: bitlbee's configure script is not an autotool creation, 
22     # so we do not use the default autotools_do_configure.
23     ./configure ${EXTRA_OECONF} || die "./configure failed"
24 }
25
26 do_compile () {
27     make CC="${CC}" LD="${LD}" || die "make failed"
28     
29     # make bitlbeed forking server
30     cd ${S}/utils
31     ${CC} bitlbeed.c -o bitlbeed || die "bitlbeed failed to compile"
32 }
33
34 do_install () {
35     # install bitlbee
36     install -d ${D}${localstatedir}/lib/bitlbee
37     make install DESTDIR=${D} || die "install failed"
38     make install-etc DESTDIR=${D} || die "install failed"
39
40     # copy bitlbee forking server
41     install ${S}/utils/bitlbeed ${D}${sbindir}/bitlbeed
42
43     # copy init script
44     install -d ${D}${sysconfdir}/init.d
45     install ${WORKDIR}/init-script ${D}${sysconfdir}/init.d/bitlbee
46     sed -i -e "s:BITLBEED_EXEC:${sbindir}/bitlbeed:" ${D}${sysconfdir}/init.d/bitlbee
47     sed -i -e "s:BITLBEED_OPTS::" ${D}${sysconfdir}/init.d/bitlbee
48
49     # copy bitlbee utils
50     install -d ${D}${datadir}/bitlbee
51     cp ${S}/utils/* ${D}${datadir}/bitlbee/
52     rm ${D}${datadir}/bitlbee/bitlbeed*
53 }
54
55 pkg_postinst () {
56     chown nobody:nogroup ${localstatedir}/lib/bitlbee
57     chmod 700 ${localstatedir}/lib/bitlbee
58 }
59