* [Buildroot] [PATCH] fswebcam: Add package
@ 2013-12-28 13:00 Lucas De Marchi
2013-12-28 16:24 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Lucas De Marchi @ 2013-12-28 13:00 UTC (permalink / raw)
To: buildroot
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
---
package/Config.in | 1 +
package/fswebcam/Config.in | 15 +++++++++++++++
package/fswebcam/fswebcam.mk | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 56 insertions(+)
create mode 100644 package/fswebcam/Config.in
create mode 100644 package/fswebcam/fswebcam.mk
diff --git a/package/Config.in b/package/Config.in
index c4b6ec1..d1bc654 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -167,6 +167,7 @@ comment "Graphic applications"
source "package/gnuplot/Config.in"
source "package/jhead/Config.in"
source "package/rrdtool/Config.in"
+source "package/fswebcam/Config.in"
comment "Graphic libraries"
source "package/cegui06/Config.in"
diff --git a/package/fswebcam/Config.in b/package/fswebcam/Config.in
new file mode 100644
index 0000000..d085dd6
--- /dev/null
+++ b/package/fswebcam/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_FSWEBCAM
+ bool "fswebcam"
+ select BR2_PACKAGE_GD
+ select BR2_PACKAGE_FREETYPE
+ select BR2_PACKAGE_JPEG
+ select BR2_PACKAGE_LIBPNG
+ help
+ fswebcam is a neat and simple webcam app. It captures images from a
+ V4L1/V4L2 compatible device or file, averages them to reduce noise
+ and draws a caption using the GD Graphics Library which also handles
+ compressing the image to PNG or JPEG. The resulting image is saved to
+ a file or sent to stdio where it can be piped to something like
+ ncftpput or scp.
+
+ http://www.firestorm.cx/fswebcam/
diff --git a/package/fswebcam/fswebcam.mk b/package/fswebcam/fswebcam.mk
new file mode 100644
index 0000000..865e915
--- /dev/null
+++ b/package/fswebcam/fswebcam.mk
@@ -0,0 +1,40 @@
+################################################################################
+#
+# fswebcam
+#
+################################################################################
+
+FSWEBCAM_VERSION = 20110717
+FSWEBCAM_SITE = http://www.firestorm.cx/fswebcam/files/
+FSWEBCAM_LICENSE = GPLv2
+FSWEBCAM_LICENSE_FILES = LICENSE
+
+FSWEBCAM_DEPENDENCIES += freetype \
+ jpeg \
+ libpng \
+ gd
+
+define FSWEBCAM_CONFIGURE_CMDS
+ (cd $(@D); \
+ ./configure --prefix=/usr \
+ )
+endef
+
+define FSWEBCAM_BUILD_CMDS
+ $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -DHAVE_CONFIG_H" \
+ LFLAGS="$(TARGET_LDFLAGS) $(FSWEBCAM_LDFLAGS)" -C $(@D)
+endef
+
+define FSWEBCAM_INSTALL_TARGET_CMDS
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
+
+define FSWEBCAM_UNINSTALL_TARGET_CMDS
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
+endef
+
+define FSWEBCAM_CLEAN_CMDS
+ -$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))
--
1.8.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] fswebcam: Add package
2013-12-28 13:00 [Buildroot] [PATCH] fswebcam: Add package Lucas De Marchi
@ 2013-12-28 16:24 ` Thomas Petazzoni
2013-12-28 17:06 ` Lucas De Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2013-12-28 16:24 UTC (permalink / raw)
To: buildroot
Dear Lucas De Marchi,
On Sat, 28 Dec 2013 11:00:39 -0200, Lucas De Marchi wrote:
> Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
> ---
> package/Config.in | 1 +
> package/fswebcam/Config.in | 15 +++++++++++++++
> package/fswebcam/fswebcam.mk | 40 ++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 56 insertions(+)
> create mode 100644 package/fswebcam/Config.in
> create mode 100644 package/fswebcam/fswebcam.mk
Thanks applied. However, I've made a number of changes, see below.
> @@ -167,6 +167,7 @@ comment "Graphic applications"
> source "package/gnuplot/Config.in"
> source "package/jhead/Config.in"
> source "package/rrdtool/Config.in"
> +source "package/fswebcam/Config.in"
Packages should be sorted alphabetically.
> + fswebcam is a neat and simple webcam app. It captures images from a
> + V4L1/V4L2 compatible device or file, averages them to reduce noise
> + and draws a caption using the GD Graphics Library which also handles
> + compressing the image to PNG or JPEG. The resulting image is saved to
> + a file or sent to stdio where it can be piped to something like
> + ncftpput or scp.
These lines were slightly too long, so I rewrap this help text.
> +FSWEBCAM_VERSION = 20110717
> +FSWEBCAM_SITE = http://www.firestorm.cx/fswebcam/files/
> +FSWEBCAM_LICENSE = GPLv2
> +FSWEBCAM_LICENSE_FILES = LICENSE
> +
> +FSWEBCAM_DEPENDENCIES += freetype \
> + jpeg \
> + libpng \
> + gd
I've used a single line.
> +define FSWEBCAM_CONFIGURE_CMDS
> + (cd $(@D); \
> + ./configure --prefix=/usr \
> + )
> +endef
This was the major mistake of your package. Since fswebcam uses an
autoconf generated configure script, you should have used
autotools-package instead of generic-package. Here, you were calling
the configure script with the host compiler: on my machine, I did not
have the "gd" library installed in my distro, so the configure script
was failing. And anyway, running the configure script with the host
compiler and configuration is just plain wrong.
> +define FSWEBCAM_BUILD_CMDS
> + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -DHAVE_CONFIG_H" \
> + LFLAGS="$(TARGET_LDFLAGS) $(FSWEBCAM_LDFLAGS)" -C $(@D)
> +endef
> +
> +define FSWEBCAM_INSTALL_TARGET_CMDS
> + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
> +endef
With autotools-package, both the configure, build and install target
steps are automatically handled by Buildroot.
> +define FSWEBCAM_UNINSTALL_TARGET_CMDS
> + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
> +endef
> +
> +define FSWEBCAM_CLEAN_CMDS
> + -$(MAKE) -C $(@D) clean
> +endef
See two are no longer needed in Buildroot, we removed them from all
packages.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] fswebcam: Add package
2013-12-28 16:24 ` Thomas Petazzoni
@ 2013-12-28 17:06 ` Lucas De Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Lucas De Marchi @ 2013-12-28 17:06 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Sat, Dec 28, 2013 at 2:24 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Lucas De Marchi,
>
> On Sat, 28 Dec 2013 11:00:39 -0200, Lucas De Marchi wrote:
>> Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
>> ---
>> package/Config.in | 1 +
>> package/fswebcam/Config.in | 15 +++++++++++++++
>> package/fswebcam/fswebcam.mk | 40 ++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 56 insertions(+)
>> create mode 100644 package/fswebcam/Config.in
>> create mode 100644 package/fswebcam/fswebcam.mk
>
> Thanks applied. However, I've made a number of changes, see below.
>
>
>> @@ -167,6 +167,7 @@ comment "Graphic applications"
>> source "package/gnuplot/Config.in"
>> source "package/jhead/Config.in"
>> source "package/rrdtool/Config.in"
>> +source "package/fswebcam/Config.in"
>
> Packages should be sorted alphabetically.
>
>
>> + fswebcam is a neat and simple webcam app. It captures images from a
>> + V4L1/V4L2 compatible device or file, averages them to reduce noise
>> + and draws a caption using the GD Graphics Library which also handles
>> + compressing the image to PNG or JPEG. The resulting image is saved to
>> + a file or sent to stdio where it can be piped to something like
>> + ncftpput or scp.
>
> These lines were slightly too long, so I rewrap this help text.
>
>> +FSWEBCAM_VERSION = 20110717
>> +FSWEBCAM_SITE = http://www.firestorm.cx/fswebcam/files/
>> +FSWEBCAM_LICENSE = GPLv2
>> +FSWEBCAM_LICENSE_FILES = LICENSE
>> +
>> +FSWEBCAM_DEPENDENCIES += freetype \
>> + jpeg \
>> + libpng \
>> + gd
>
> I've used a single line.
>
>> +define FSWEBCAM_CONFIGURE_CMDS
>> + (cd $(@D); \
>> + ./configure --prefix=/usr \
>> + )
>> +endef
>
> This was the major mistake of your package. Since fswebcam uses an
> autoconf generated configure script, you should have used
> autotools-package instead of generic-package. Here, you were calling
> the configure script with the host compiler: on my machine, I did not
> have the "gd" library installed in my distro, so the configure script
> was failing. And anyway, running the configure script with the host
> compiler and configuration is just plain wrong.
>
>> +define FSWEBCAM_BUILD_CMDS
>> + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -DHAVE_CONFIG_H" \
>> + LFLAGS="$(TARGET_LDFLAGS) $(FSWEBCAM_LDFLAGS)" -C $(@D)
>> +endef
>> +
>> +define FSWEBCAM_INSTALL_TARGET_CMDS
>> + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
>> +endef
>
> With autotools-package, both the configure, build and install target
> steps are automatically handled by Buildroot.
>
>> +define FSWEBCAM_UNINSTALL_TARGET_CMDS
>> + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
>> +endef
>> +
>> +define FSWEBCAM_CLEAN_CMDS
>> + -$(MAKE) -C $(@D) clean
>> +endef
>
> See two are no longer needed in Buildroot, we removed them from all
> packages.
Thanks for fixing this up.
Lucas De Marchi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-28 17:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-28 13:00 [Buildroot] [PATCH] fswebcam: Add package Lucas De Marchi
2013-12-28 16:24 ` Thomas Petazzoni
2013-12-28 17:06 ` Lucas De Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox