All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: martin.jansa@gmail.comexit, koen@dominion.thruhere.net
Subject: Re: [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1
Date: Wed, 16 Apr 2014 21:01:37 +0200	[thread overview]
Message-ID: <20140416190137.GF2458@jama> (raw)
In-Reply-To: <1397671872-57992-1-git-send-email-krzysztof.m.sywula@intel.com>

[-- Attachment #1: Type: text/plain, Size: 4660 bytes --]

On Wed, Apr 16, 2014 at 07:11:12PM +0100, krzysztof.m.sywula@intel.com wrote:
> From: Krzysztof Sywula <krzysztof.m.sywula@intel.com>
> 
> Signed-off-by: Krzysztof Sywula <krzysztof.m.sywula@intel.com>
> ---
>  .../recipes-connectivity/bitlbee/bitlbee_3.2.1.bb  | 61 ++++++++++++++++++++++
>  .../recipes-connectivity/bitlbee/files/init-script | 31 +++++++++++
>  2 files changed, 92 insertions(+)
>  create mode 100644 meta-oe/recipes-connectivity/bitlbee/bitlbee_3.2.1.bb
>  create mode 100644 meta-oe/recipes-connectivity/bitlbee/files/init-script
> 
> diff --git a/meta-oe/recipes-connectivity/bitlbee/bitlbee_3.2.1.bb b/meta-oe/recipes-connectivity/bitlbee/bitlbee_3.2.1.bb
> new file mode 100644
> index 0000000..449e6a0
> --- /dev/null
> +++ b/meta-oe/recipes-connectivity/bitlbee/bitlbee_3.2.1.bb
> @@ -0,0 +1,61 @@
> +SUMMARY = "Bitlbee is an IRC to IM gateway that support multiple IM protocols."
> +HOMEPAGE = "http://www.bitlbee.org/"
> +SECTION = "console/network"
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
> +
> +DEPENDS = "glib-2.0 openssl"
> +
> +SRC_URI = "http://get.bitlbee.org/src/${P}.tar.gz \
> +           file://init-script"
> +
> +SRC_URI[md5sum] = "6ee7c7a99eb59dfcf0307fcf44c14105"
> +SRC_URI[sha256sum] = "00f411dd7d6d28f30f0e73e46c9cbe88b4006e7f03adfe07b90a97280a290f59"
> +
> +S = "${WORKDIR}/bitlbee-${PV}"

This looks like default value, isn't it?

> +EXTRA_OECONF = "--prefix=/usr \
> +                --datadir=/usr/share/bitlbee \
> +                --etcdir=/etc/bitlbee \
> +                --oscar=0 \
> +                --ssl=openssl"
> +
> +do_configure () {
> +    # NOTE: bitlbee's configure script is not an autotool creation, 
> +    # so we do not use the default autotools_do_configure.

This recipe doesn't inherit autotools, so there is no "default
autotools_do_configure" afaik.

> +    ./configure ${EXTRA_OECONF} || die "./configure failed"
> +}
> +
> +do_compile () {
> +    make CC="${CC}" LD="${LD}" || die "make failed"

Can you use oe_runmake to respect EXTRA_OEMAKE, especially PARALLEL_MAKE?

> +    # make bitlbeed forking server
> +    cd ${S}/utils
> +    ${CC} bitlbeed.c -o bitlbeed || die "bitlbeed failed to compile"
> +}
> +
> +do_install () {
> +    # install bitlbee
> +    install -d ${D}${localstatedir}/lib/bitlbee
> +    make install DESTDIR=${D} || die "install failed"
> +    make install-etc DESTDIR=${D} || die "install failed"

Can you use oe_runmake to respect EXTRA_OEMAKE, especially PARALLEL_MAKE?

> +
> +    # copy bitlbee forking server
> +    install ${S}/utils/bitlbeed ${D}${sbindir}/bitlbeed
> +
> +    # copy init script
> +    install -d ${D}${sysconfdir}/init.d
> +    install ${WORKDIR}/init-script ${D}${sysconfdir}/init.d/bitlbee
> +    sed -i -e "s:BITLBEED_EXEC:${sbindir}/bitlbeed:" ${D}${sysconfdir}/init.d/bitlbee
> +    sed -i -e "s:BITLBEED_OPTS::" ${D}${sysconfdir}/init.d/bitlbee
> +
> +    # copy bitlbee utils
> +    install -d ${D}${datadir}/bitlbee
> +    cp ${S}/utils/* ${D}${datadir}/bitlbee/
> +    rm ${D}${datadir}/bitlbee/bitlbeed*
> +}
> +
> +pkg_postinst_${PN} () {
> +    chown nobody:nogroup ${localstatedir}/lib/bitlbee
> +    chmod 700 ${localstatedir}/lib/bitlbee
> +}
> diff --git a/meta-oe/recipes-connectivity/bitlbee/files/init-script b/meta-oe/recipes-connectivity/bitlbee/files/init-script
> new file mode 100644
> index 0000000..3ec3fdf
> --- /dev/null
> +++ b/meta-oe/recipes-connectivity/bitlbee/files/init-script
> @@ -0,0 +1,31 @@
> +#!/bin/sh

please add LSB headers

> +
> +case "$1" in
> +    start)
> +    	echo "Starting bitlbee daemon"
> +	start-stop-daemon --start --startas BITLBEED_EXEC \
> +		-c nobody:nogroup  --exec BITLBEED_EXEC -- \
> +		BITLBEED_OPTS /usr/sbin/bitlbee
> +	[ $? -eq 0 ] || echo $? "Failed to start bitlbee daemon"
> +    ;;
> +
> +    stop)
> +        echo "Stopping bitlbee daemon"
> +	start-stop-daemon --stop --signal 9 \
> +	                 --exec BITLBEED_EXEC
> +	[ $? -eq 0 ] || echo $? "Failed to stop bitlbee daemon"
> +    ;;
> +
> +    restart)
> +    	$0 stop
> +    	sleep 1
> +    	$0 start
> +    ;;
> +
> +    *)
> +        echo "usage: $0 { start | stop }"
> +    	exit 1
> +    ;;
> +esac
> +
> +exit 0
> -- 
> 1.8.2
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2014-04-16 19:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 18:11 [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1 krzysztof.m.sywula
2014-04-16 19:01 ` Martin Jansa [this message]
2014-04-16 23:02 ` Khem Raj
2014-04-17 10:06   ` Sywula, Krzysztof M

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140416190137.GF2458@jama \
    --to=martin.jansa@gmail.com \
    --cc=koen@dominion.thruhere.net \
    --cc=martin.jansa@gmail.comexit \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.