aboutsummaryrefslogtreecommitdiff
path: root/package/ifupdown
diff options
context:
space:
mode:
authorGravatar Gustavo Zacarias <gustavo@zacarias.com.ar>2014-11-27 14:00:29 -0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-01-12 22:46:11 +0100
commita71b8df5ba20baa84c5a3fcc28ffcb9b373a7772 (patch)
tree8aad54f4fe2448045cb1c538594e1aeba0121205 /package/ifupdown
parent3a005f10e8811956df65ed852ac899ec2a4ecf1d (diff)
downloadbuildroot-a71b8df5ba20baa84c5a3fcc28ffcb9b373a7772.tar.gz
buildroot-a71b8df5ba20baa84c5a3fcc28ffcb9b373a7772.tar.bz2
ifupdown: new package
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Tested-by: Karoly Kasza <kaszak@gmail.com> Reviewed-by: Karoly Kasza <kaszak@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/ifupdown')
-rw-r--r--package/ifupdown/0001-dont-use-dpkg-architecture.patch17
-rw-r--r--package/ifupdown/Config.in17
-rw-r--r--package/ifupdown/ifupdown.hash2
-rw-r--r--package/ifupdown/ifupdown.mk26
4 files changed, 62 insertions, 0 deletions
diff --git a/package/ifupdown/0001-dont-use-dpkg-architecture.patch b/package/ifupdown/0001-dont-use-dpkg-architecture.patch
new file mode 100644
index 0000000000..bb5c58f840
--- /dev/null
+++ b/package/ifupdown/0001-dont-use-dpkg-architecture.patch
@@ -0,0 +1,17 @@
+Drop the need for dpkg-architecture, we only build for linux.
+Thanks to Károly Kasza for catching this one.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura ifupdown.orig/defn2c.pl ifupdown/defn2c.pl
+--- ifupdown.orig/defn2c.pl 2014-11-18 16:39:28.878772655 -0300
++++ ifupdown/defn2c.pl 2014-11-18 16:43:41.120456676 -0300
+@@ -2,7 +2,7 @@
+
+ use strict;
+
+-my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`;
++my $DEB_HOST_ARCH_OS = "linux";
+
+ $DEB_HOST_ARCH_OS =~ s/\n//;
+
diff --git a/package/ifupdown/Config.in b/package/ifupdown/Config.in
new file mode 100644
index 0000000000..10cf2be115
--- /dev/null
+++ b/package/ifupdown/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_IFUPDOWN
+ bool "ifupdown"
+ depends on BR2_USE_MMU # fork()
+ # Default/our uclibc lacks wordexp()
+ depends on !BR2_TOOLCHAIN_USES_UCLIBC
+ # runtime for ip binary
+ select BR2_PACKAGE_IPROUTE2 if !BR2_PACKAGE_BUSYBOX
+ # runtime for run-parts
+ select BR2_PACKAGE_DEBIANUTILS if !BR2_PACKAGE_BUSYBOX
+ help
+ High level tools to configure network interfaces.
+
+ https://tracker.debian.org/pkg/ifupdown
+
+comment "ifupdown needs an (e)glibc or musl toolchain"
+ depends on BR2_USE_MMU
+ depends on BR2_TOOLCHAIN_USES_UCLIBC
diff --git a/package/ifupdown/ifupdown.hash b/package/ifupdown/ifupdown.hash
new file mode 100644
index 0000000000..f0c314bd01
--- /dev/null
+++ b/package/ifupdown/ifupdown.hash
@@ -0,0 +1,2 @@
+# From http://ftp.de.debian.org/debian/pool/main/i/ifupdown/ifupdown_0.7.49.dsc
+sha256 5d07c73610ff90393c7273e2af9003eeb1825fc88144ae5ed11a5517547d0f58 ifupdown_0.7.49.tar.xz
diff --git a/package/ifupdown/ifupdown.mk b/package/ifupdown/ifupdown.mk
new file mode 100644
index 0000000000..5c78eedcd1
--- /dev/null
+++ b/package/ifupdown/ifupdown.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# ifupdown
+#
+################################################################################
+
+IFUPDOWN_VERSION = 0.7.49
+IFUPDOWN_SOURCE = ifupdown_$(IFUPDOWN_VERSION).tar.xz
+IFUPDOWN_SITE = http://snapshot.debian.org/archive/debian/20140923T221921Z/pool/main/i/ifupdown
+IFUPDOWN_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+IFUPDOWN_LICENSE = GPLv2+
+IFUPDOWN_LICENSE_FILES = COPYING
+
+define IFUPDOWN_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS) -D'IFUPDOWN_VERSION=\"$(IFUPDOWN_VERSION)\"'" \
+ -C $(@D)
+endef
+
+# install doesn't overwrite
+define IFUPDOWN_INSTALL_TARGET_CMDS
+ $(RM) $(TARGET_DIR)/sbin/{ifdown,ifquery}
+ $(TARGET_MAKE_ENV) $(MAKE) BASEDIR=$(TARGET_DIR) -C $(@D) install
+endef
+
+$(eval $(generic-package))