1
0

Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=bridge-utils
  10. PKG_VERSION:=1.5
  11. PKG_RELEASE:=5
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git
  14. PKG_SOURCE_VERSION:=v${PKG_VERSION}
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  17. PKG_LICENSE:=GPL-2.0+
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_FIXUP:=autoreconf
  20. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/bridge
  23. SECTION:=net
  24. CATEGORY:=Base system
  25. TITLE:=Ethernet bridging configuration utility
  26. URL:=http://bridge.sourceforge.net/
  27. PKG_MAINTAINER:=Nikolay Martynov <mar.kolya@gmail.com>
  28. endef
  29. define Package/bridge/description
  30. Manage ethernet bridging: a way to connect networks together to
  31. form a larger network.
  32. endef
  33. TARGET_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
  34. CONFIGURE_ARGS += \
  35. --with-linux-headers="$(LINUX_DIR)" \
  36. define Package/bridge/install
  37. $(INSTALL_DIR) $(1)/usr/sbin
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin
  39. endef
  40. define Package/bridge/prerm
  41. #!/bin/sh
  42. $${IPKG_INSTROOT}/bin/busybox brctl -h 2>&1 | grep -q BusyBox && \
  43. ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/sbin/brctl
  44. exit 0
  45. endef
  46. $(eval $(call BuildPackage,bridge))