1
0

Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Copyright (C) 2010-2011 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. PKG_NAME:=ap51-flash
  9. PKG_VERSION:=2016-10-16
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=git://dev.cloudtrax.com/ap51-flash.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=48b3fbac1c30c5968b2608eb09b53ea37c310a24
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
  16. PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
  17. include $(INCLUDE_DIR)/package.mk
  18. ifeq ($(CONFIG_BIG_ENDIAN),y)
  19. STAMP_BUILT:=$(STAMP_BUILT)_big
  20. endif
  21. define Package/ap51-flash
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=A tool for flashing (nearly) all ap51/ap61 based routers
  25. URL:=http://dev.cloudtrax.com/wiki/ap51-flash-station
  26. endef
  27. TARGET_EXTRA_CFLAGS:=-DFLASH_FROM_FILE -DNO_LIBPCAP -D_GNU_SOURCE -DIPPORT_TFTP=69
  28. ifeq ($(CONFIG_BIG_ENDIAN),y)
  29. TARGET_EXTRA_CFLAGS:=$(TARGET_EXTRA_CFLAGS) -DUIP_CONF_BYTE_ORDER=1234
  30. endif
  31. # pass optimization flags
  32. MAKE_FLAGS += \
  33. OFLAGS="$(TARGET_CFLAGS)" \
  34. EXTRA_CFLAGS="$(TARGET_EXTRA_CFLAGS)" \
  35. REVISION="$(PKG_VERSION)" \
  36. ap51-flash
  37. define Package/ap51-flash/install
  38. $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin \
  39. $(1)/usr/lib/ap51-flash
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ap51-flash $(1)/usr/sbin/
  41. $(INSTALL_BIN) ./files/ap51-flash.init $(1)/etc/init.d/ap51-flash
  42. $(INSTALL_BIN) ./files/ap51-flash.sh $(1)/usr/lib/ap51-flash/ap51-flash.sh
  43. $(INSTALL_DATA) ./files/ap51-flash.config $(1)/etc/config/ap51-flash
  44. endef
  45. define Package/ap51-flash/conffiles
  46. /etc/config/ap51-flash
  47. endef
  48. $(eval $(call BuildPackage,ap51-flash))