All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1
@ 2014-04-16 18:11 krzysztof.m.sywula
  2014-04-16 19:01 ` Martin Jansa
  2014-04-16 23:02 ` Khem Raj
  0 siblings, 2 replies; 4+ messages in thread
From: krzysztof.m.sywula @ 2014-04-16 18:11 UTC (permalink / raw)
  To: openembedded-devel; +Cc: martin.jansa, koen

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}"
+
+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.
+    ./configure ${EXTRA_OECONF} || die "./configure failed"
+}
+
+do_compile () {
+    make CC="${CC}" LD="${LD}" || die "make failed"
+    
+    # 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"
+
+    # 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
+
+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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1
  2014-04-16 18:11 [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1 krzysztof.m.sywula
@ 2014-04-16 19:01 ` Martin Jansa
  2014-04-16 23:02 ` Khem Raj
  1 sibling, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2014-04-16 19:01 UTC (permalink / raw)
  To: openembedded-devel; +Cc: martin.jansa, koen

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1
  2014-04-16 18:11 [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1 krzysztof.m.sywula
  2014-04-16 19:01 ` Martin Jansa
@ 2014-04-16 23:02 ` Khem Raj
  2014-04-17 10:06   ` Sywula, Krzysztof M
  1 sibling, 1 reply; 4+ messages in thread
From: Khem Raj @ 2014-04-16 23:02 UTC (permalink / raw)
  To: openembeded-devel; +Cc: martin.jansa, Koen Kooi

On Wed, Apr 16, 2014 at 11:11 AM,  <krzysztof.m.sywula@intel.com> wrote:
> +EXTRA_OECONF = "--prefix=/usr \
> +                --datadir=/usr/share/bitlbee \
> +                --etcdir=/etc/bitlbee \
> +                --oscar=0 \
> +                --ssl=openssl"

should these be hardcoded ?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1
  2014-04-16 23:02 ` Khem Raj
@ 2014-04-17 10:06   ` Sywula, Krzysztof M
  0 siblings, 0 replies; 4+ messages in thread
From: Sywula, Krzysztof M @ 2014-04-17 10:06 UTC (permalink / raw)
  To: openembedded-devel@lists.openembedded.org; +Cc: Koen Kooi

> +EXTRA_OECONF = "--prefix=/usr \
> +                --datadir=/usr/share/bitlbee \
> +                --etcdir=/etc/bitlbee \
> +                --oscar=0 \
These I took from initial recipe in openembedded. 

> +                --ssl=openssl"
That is added by myself. Tried with auto (=gnutls) on  x86 Galileo board and bitlbee was failing in a very obfuscated way.

-----Original Message-----
From: openembedded-devel-bounces@lists.openembedded.org [mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of Khem Raj
Sent: Thursday, April 17, 2014 12:02 AM
To: openembeded-devel
Cc: martin.jansa@gmail.comexit; Koen Kooi
Subject: Re: [oe] [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1

On Wed, Apr 16, 2014 at 11:11 AM,  <krzysztof.m.sywula@intel.com> wrote:
> +EXTRA_OECONF = "--prefix=/usr \
> +                --datadir=/usr/share/bitlbee \
> +                --etcdir=/etc/bitlbee \
> +                --oscar=0 \
> +                --ssl=openssl"

should these be hardcoded ?
-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
-------------------------------------------------------------
Intel Ireland Limited (Branch)
Collinstown Industrial Park, Leixlip, County Kildare, Ireland
Registered Number: E902934

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-17 10:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-16 18:11 [meta-oe][PATCH] bitlbee: add bitlbee-3.2.1 krzysztof.m.sywula
2014-04-16 19:01 ` Martin Jansa
2014-04-16 23:02 ` Khem Raj
2014-04-17 10:06   ` Sywula, Krzysztof M

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.