Patchwork [10/13] librtmp: new package

login
register
mail settings
Submitter Maxime Hadjinlian
Date Feb. 21, 2013, 2:58 p.m.
Message ID <b7845a27b24e15e0657906431ba388d10d725f73.1361458625.git.maxime.hadjinlian@gmail.com>
Download mbox | patch
Permalink /patch/222316/
State Changes Requested
Headers show

Comments

Maxime Hadjinlian - Feb. 21, 2013, 2:58 p.m.
librtmp - RTMPDump Real-Time Messaging Protocol API
This package was originally found at : https://github.com/huceke/buildroot-rbp
By gimli <ebsi4711@gmail.com>

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 package/Config.in          |    1 +
 package/librtmp/Config.in  |    8 ++++++++
 package/librtmp/librtmp.mk |   27 +++++++++++++++++++++++++++
 3 files changed, 36 insertions(+)
 create mode 100644 package/librtmp/Config.in
 create mode 100644 package/librtmp/librtmp.mk
Yann E. MORIN - Feb. 21, 2013, 8:17 p.m.
Maxime, All,

On Thursday 21 February 2013 Maxime Hadjinlian wrote:
> librtmp - RTMPDump Real-Time Messaging Protocol API
> This package was originally found at : https://github.com/huceke/buildroot-rbp
> By gimli <ebsi4711@gmail.com>

> diff --git a/package/librtmp/Config.in b/package/librtmp/Config.in
> new file mode 100644
> index 0000000..8152f87
> --- /dev/null
> +++ b/package/librtmp/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_LIBRTMP
> +	bool "librtmp"

The package is 'rtmpdump' so I'd just call it 'rtmpdump' in Buildroot as
well (you can add in the help text that only the librtmp is installed).

> +	select BR2_PACKAGE_OPENSSL

rtmpdump can also use gnutls, so I'd rather do:

    select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_POLARSSL && !BR2_PACKAGE_GNUTLS

And adapt the .mk accordingly, of course.

There is no point in forcing openssl if the user already chose to use
another SSL library.

> diff --git a/package/librtmp/librtmp.mk b/package/librtmp/librtmp.mk
> new file mode 100644
> index 0000000..5e60428
> --- /dev/null
> +++ b/package/librtmp/librtmp.mk
> @@ -0,0 +1,27 @@
> +#############################################################
> +#
> +#librtmp
> +#
> +#############################################################
> +
> +LIBRTMP_VERSION = e0056c51cc1710c9a44d2a2c4e2f344fa9cabcf4
> +LIBRTMP_SITE = git://git.ffmpeg.org/rtmpdump
> +LIBRTMP_INSTALL_STAGING = YES
> +LIBRTMP_LICENSE = GPLv2

Since you only install the library, it's LGPLv2.1+.

librtmp/ has its own COPYING file, which is LGPLv2.1, and source files
in librtmp/ all refer to LGPLv2.1 or later. So, GPLv2.1+.

Add a comment in this file that the LICENSE should be updated, should
the program(s) be one day installed.

> +LIBRTMP_LICENSE_FILES = COPYING
> +LIBRTMP_DEPENDENCIES = openssl zlib

And here, I'd do something like:

    LIBRTMP_DEPENDENCIES = openssl zlib
    ifeq ($(BR2_PACKAGE_GNUTLS),y)
    LIBRTMP_DEPENDENCIES += gnutls
    else
    ifeq ($(BR2_PACKAGE_POLARSSL),y)
    LIBRTMP_DEPENDENCIES += polarssl
    else
    LIBRTMP_DEPENDENCIES += openssl
    endif
    endif

> +define LIBRTMP_BUILD_CMDS
> +	sed -ie "s|prefix=/usr/local|prefix=/usr|" $(@D)/librtmp/Makefile

I'd do that as a post-extract (or post-patch) hook instead.

Regards,
Yann E. MORIN.
Thomas Petazzoni - Feb. 24, 2013, 3:34 a.m.
Dear Yann E. MORIN,

On Thu, 21 Feb 2013 21:17:57 +0100, Yann E. MORIN wrote:

> > +LIBRTMP_LICENSE_FILES = COPYING
> > +LIBRTMP_DEPENDENCIES = openssl zlib
> 
> And here, I'd do something like:
> 
>     LIBRTMP_DEPENDENCIES = openssl zlib

This line should be:

 	LIBRTMP_DEPENDENCIES = zlib

>     ifeq ($(BR2_PACKAGE_GNUTLS),y)
>     LIBRTMP_DEPENDENCIES += gnutls
>     else
>     ifeq ($(BR2_PACKAGE_POLARSSL),y)
>     LIBRTMP_DEPENDENCIES += polarssl
>     else
>     LIBRTMP_DEPENDENCIES += openssl
>     endif
>     endif

Best regards,

Thomas

Patch

diff --git a/package/Config.in b/package/Config.in
index 382d859..6e926bf 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -434,6 +434,7 @@  source "package/libgtk2/Config.in"
 source "package/libpng/Config.in"
 source "package/libraw/Config.in"
 source "package/librsvg/Config.in"
+source "package/librtmp/Config.in"
 source "package/libsvgtiny/Config.in"
 source "package/libungif/Config.in"
 source "package/opencv/Config.in"
diff --git a/package/librtmp/Config.in b/package/librtmp/Config.in
new file mode 100644
index 0000000..8152f87
--- /dev/null
+++ b/package/librtmp/Config.in
@@ -0,0 +1,8 @@ 
+config BR2_PACKAGE_LIBRTMP
+	bool "librtmp"
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_ZLIB
+	help
+	  librtmp - RTMPDump Real-Time Messaging Protocol API
+
+	  http://rtmpdump.mplayerhq.hu
diff --git a/package/librtmp/librtmp.mk b/package/librtmp/librtmp.mk
new file mode 100644
index 0000000..5e60428
--- /dev/null
+++ b/package/librtmp/librtmp.mk
@@ -0,0 +1,27 @@ 
+#############################################################
+#
+#librtmp
+#
+#############################################################
+
+LIBRTMP_VERSION = e0056c51cc1710c9a44d2a2c4e2f344fa9cabcf4
+LIBRTMP_SITE = git://git.ffmpeg.org/rtmpdump
+LIBRTMP_INSTALL_STAGING = YES
+LIBRTMP_LICENSE = GPLv2
+LIBRTMP_LICENSE_FILES = COPYING
+LIBRTMP_DEPENDENCIES = openssl zlib
+
+define LIBRTMP_BUILD_CMDS
+	sed -ie "s|prefix=/usr/local|prefix=/usr|" $(@D)/librtmp/Makefile
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D)/librtmp
+endef
+
+define LIBRTMP_INSTALL_STAGING_CMDS
+	$(MAKE) -C $(@D)/librtmp install DESTDIR=$(STAGING_DIR)
+endef
+
+define LIBRTMP_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D)/librtmp install DESTDIR=$(STAGING_DIR)
+endef
+
+$(eval $(generic-package))