fswebcam: Add package
PATCH 1/1 fswebcam: Add package
--- 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
package/Config.in +1 -0
@@ -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"
package/fswebcam/Config.in new file +15 -0
@@ -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/
package/fswebcam/fswebcam.mk new file +40 -0
@@ -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))
Signature · 1 line
1.8.5.2
Thomas Petazzoni
AppliedPATCH 1/1 fswebcam: Add package
Dear Lucas De Marchi,
Quoted 8 lines · Lucas De Marchi
Signed-off-by Lucas De Marchi <[email protected]>--- 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.
package/Config.in comment "Graphic applications" · line 170
Quoted 5 lines
package/Config.in +1
-0@@ -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.
package/fswebcam/Config.in line 13
Quoted 6 lines
package/fswebcam/Config.in new file +6
-0+ 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.
package/fswebcam/fswebcam.mk line 15
Quoted 9 lines
package/fswebcam/fswebcam.mk new file +9
-0+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.
package/fswebcam/fswebcam.mk line 21
Quoted 5 lines
package/fswebcam/fswebcam.mk new file +5
-0+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.
package/fswebcam/fswebcam.mk line 30
Quoted 8 lines
package/fswebcam/fswebcam.mk new file +8
-0+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.
package/fswebcam/fswebcam.mk line 38
Quoted 7 lines
package/fswebcam/fswebcam.mk new file +7
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 fswebcam: Add package
Hi Thomas,
Quoted 71 lines · Thomas Petazzoni
Dear Lucas De Marchi,
Quoted 8 lines · Lucas De Marchi
Signed-off-by Lucas De Marchi <[email protected]>--- 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.mkThanks applied. However, I've made a number of changes, see below.
package/Config.in comment "Graphic applications" · line 170
Quoted 5 lines
package/Config.in +1
-0@@ -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.
package/fswebcam/Config.in line 13
Quoted 6 lines
package/fswebcam/Config.in new file +6
-0+ 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.
package/fswebcam/fswebcam.mk line 15
Quoted 9 lines
package/fswebcam/fswebcam.mk new file +9
-0+FSWEBCAM_VERSION = 20110717 +FSWEBCAM_SITE = http://www.firestorm.cx/fswebcam/files/ +FSWEBCAM_LICENSE = GPLv2 +FSWEBCAM_LICENSE_FILES = LICENSE + +FSWEBCAM_DEPENDENCIES += freetype \ + jpeg \ + libpng \ + gdI've used a single line.
package/fswebcam/fswebcam.mk line 21
Quoted 5 lines
package/fswebcam/fswebcam.mk new file +5
-0+define FSWEBCAM_CONFIGURE_CMDS + (cd $(@D); \ + ./configure --prefix=/usr \ + ) +endefThis 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.
package/fswebcam/fswebcam.mk line 30
Quoted 8 lines
package/fswebcam/fswebcam.mk new file +8
-0+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 +endefWith autotools-package, both the configure, build and install target steps are automatically handled by Buildroot.
Quoted 10 lines
package/fswebcam/fswebcam.mk line 38
Quoted 7 lines
package/fswebcam/fswebcam.mk new file +7
-0+define FSWEBCAM_UNINSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall +endef + +define FSWEBCAM_CLEAN_CMDS + -$(MAKE) -C $(@D) clean +endefSee two are no longer needed in Buildroot, we removed them from all packages.
Thanks for fixing this up.
Lucas De Marchi