Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / net / bridge-utils / Makefile
1 #
2 # Copyright (C) 2006-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=bridge-utils
12 PKG_VERSION:=1.5
13 PKG_RELEASE:=5
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git
17 PKG_SOURCE_VERSION:=v${PKG_VERSION}
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20 PKG_MIRROR_HASH:=ce568c41f60987ed972c53fb8dab92bf45052849c4992e8ae931c1eb505630b7
21
22 PKG_LICENSE:=GPL-2.0+
23 PKG_LICENSE_FILES:=COPYING
24 PKG_FIXUP:=autoreconf
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/bridge
29 SECTION:=net
30 CATEGORY:=Base system
31 TITLE:=Ethernet bridging configuration utility
32 URL:=http://bridge.sourceforge.net/
33 PKG_MAINTAINER:=Nikolay Martynov <mar.kolya@gmail.com>
34 endef
35
36 define Package/bridge/description
37 Manage ethernet bridging: a way to connect networks together to
38 form a larger network.
39 endef
40
41 TARGET_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
42
43 CONFIGURE_ARGS += \
44 --with-linux-headers="$(LINUX_DIR)" \
45
46 define Package/bridge/install
47 $(INSTALL_DIR) $(1)/usr/sbin
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin
49 endef
50
51 define Package/bridge/prerm
52 #!/bin/sh
53 $${IPKG_INSTROOT}/bin/busybox brctl -h 2>&1 | grep -q BusyBox && \
54 ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/sbin/brctl
55 exit 0
56 endef
57
58 $(eval $(call BuildPackage,bridge))