Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] ebtables: new package
@ 2011-07-07 13:42 Baruch Siach
  2011-07-10 21:08 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2011-07-07 13:42 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/Config.in            |    1 +
 package/ebtables/Config.in   |    6 ++++++
 package/ebtables/ebtables.mk |   24 ++++++++++++++++++++++++
 3 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 package/ebtables/Config.in
 create mode 100644 package/ebtables/ebtables.mk

diff --git a/package/Config.in b/package/Config.in
index 40f523d..853194f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -387,6 +387,7 @@ endif
 source "package/dhcpdump/Config.in"
 source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
+source "package/ebtables/Config.in"
 source "package/ethtool/Config.in"
 source "package/hostapd/Config.in"
 source "package/ifplugd/Config.in"
diff --git a/package/ebtables/Config.in b/package/ebtables/Config.in
new file mode 100644
index 0000000..73af12a
--- /dev/null
+++ b/package/ebtables/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_EBTABLES
+	bool "ebtables"
+	help
+	  Ethernet bridge frame table administration
+
+	  http://ebtables.sourceforge.net
diff --git a/package/ebtables/ebtables.mk b/package/ebtables/ebtables.mk
new file mode 100644
index 0000000..553bbb7
--- /dev/null
+++ b/package/ebtables/ebtables.mk
@@ -0,0 +1,24 @@
+#############################################################
+#
+# ebtables
+#
+#############################################################
+EBTABLES_VERSION = 2.0.9-2
+EBTABLES_SOURCE = ebtables-v$(EBTABLES_VERSION).tar.gz
+EBTABLES_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ebtables
+
+define EBTABLES_BUILD_CMDS
+	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) LIBDIR=/lib/ebtables -C $(@D)
+endef
+
+define EBTABLES_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/lib/ebtables
+	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/extensions/*.so \
+		$(TARGET_DIR)/lib/ebtables
+	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/*.so \
+		$(TARGET_DIR)/lib/ebtables
+	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/ebtables \
+		$(TARGET_DIR)/sbin/ebtables
+endef
+
+$(eval $(call GENTARGETS,package,ebtables))
-- 
1.7.5.4

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

* [Buildroot] [PATCH] ebtables: new package
  2011-07-07 13:42 [Buildroot] [PATCH] ebtables: new package Baruch Siach
@ 2011-07-10 21:08 ` Peter Korsgaard
  2011-07-11  3:57   ` Baruch Siach
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2011-07-10 21:08 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 Baruch> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Thanks, a few comments:

 Baruch> +++ b/package/ebtables/ebtables.mk
 Baruch> @@ -0,0 +1,24 @@
 Baruch> +#############################################################
 Baruch> +#
 Baruch> +# ebtables
 Baruch> +#
 Baruch> +#############################################################
 Baruch> +EBTABLES_VERSION = 2.0.9-2

2.0.10-1 is (now) out.

 Baruch> +EBTABLES_SOURCE = ebtables-v$(EBTABLES_VERSION).tar.gz
 Baruch> +EBTABLES_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ebtables
 Baruch> +
 Baruch> +define EBTABLES_BUILD_CMDS
 Baruch> +	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) LIBDIR=/lib/ebtables -C $(@D)

You have to add quotes ("") around TARGET_CC / TARGET_LD as
E.G. TARGET_CC is two words when ccache is enabled. You should also set
CFLAGS / LDFLAGS, or even better use TARGET_CONFIGURE_OPTS.

 Baruch> +endef
 Baruch> +
 Baruch> +define EBTABLES_INSTALL_TARGET_CMDS
 Baruch> +	mkdir -p $(TARGET_DIR)/lib/ebtables
 Baruch> +	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/extensions/*.so \
 Baruch> +		$(TARGET_DIR)/lib/ebtables
 Baruch> +	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/*.so \
 Baruch> +		$(TARGET_DIR)/lib/ebtables
 Baruch> +	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/ebtables \
 Baruch> +		$(TARGET_DIR)/sbin/ebtables

Doesn't the makefile have an install target? You need to provide the
destination file name (not just the dir) when you use install -D.

Uninstall handling would be good as well.

Care to fix and resend?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] ebtables: new package
  2011-07-10 21:08 ` Peter Korsgaard
@ 2011-07-11  3:57   ` Baruch Siach
  2011-07-11  5:10     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2011-07-11  3:57 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On Sun, Jul 10, 2011 at 11:08:35PM +0200, Peter Korsgaard wrote:
> >>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
> 
>  Baruch> +endef
>  Baruch> +
>  Baruch> +define EBTABLES_INSTALL_TARGET_CMDS
>  Baruch> +	mkdir -p $(TARGET_DIR)/lib/ebtables
>  Baruch> +	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/extensions/*.so \
>  Baruch> +		$(TARGET_DIR)/lib/ebtables
>  Baruch> +	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/*.so \
>  Baruch> +		$(TARGET_DIR)/lib/ebtables
>  Baruch> +	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/ebtables \
>  Baruch> +		$(TARGET_DIR)/sbin/ebtables
> 
> Doesn't the makefile have an install target?

It does, but the 'exec' target (a dependency of 'install') uses install with 
-o root, which fails when building as non-root. Is there a standard way to 
make the install target under fakeroot?

> Care to fix and resend?

I'll update and resend.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH] ebtables: new package
  2011-07-11  3:57   ` Baruch Siach
@ 2011-07-11  5:10     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2011-07-11  5:10 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

Hi,

 >> Doesn't the makefile have an install target?

 Baruch> It does, but the 'exec' target (a dependency of 'install') uses
 Baruch> install with -o root, which fails when building as non-root. Is
 Baruch> there a standard way to make the install target under fakeroot?

Ok, in that case you can either do:
- Manual install like you're doing now
- Patch the Makefile to fix it

The manual install option is OK with me.

 >> Care to fix and resend?

 Baruch> I'll update and resend.

Great, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2011-07-11  5:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 13:42 [Buildroot] [PATCH] ebtables: new package Baruch Siach
2011-07-10 21:08 ` Peter Korsgaard
2011-07-11  3:57   ` Baruch Siach
2011-07-11  5:10     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox