You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

  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:=2019.0.1
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/ap51-flash/ap51-flash/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=7146a22576a23bfe36673980bc3795a97417692eaddb2f90b527074a7d7e42d5
  14. PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
  15. PKG_LICENSE:=GPL-3.0-or-later CC0-1.0
  16. PKG_LICENSE_FILES:=LICENSES/GPL-3.0-or-later.txt LICENSES/CC0-1.0.txt
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/ap51-flash
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. TITLE:=A tool for flashing (nearly) all ap51/ap61 based routers
  22. URL:=https://ap51-flash.readthedocs.io/en/latest/
  23. endef
  24. # pass optimization flags
  25. MAKE_FLAGS += \
  26. REVISION="$(PKG_VERSION)" \
  27. ap51-flash
  28. TARGET_CFLAGS += -flto
  29. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  30. define Package/ap51-flash/install
  31. $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin \
  32. $(1)/usr/lib/ap51-flash
  33. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ap51-flash $(1)/usr/sbin/
  34. $(INSTALL_BIN) ./files/ap51-flash.init $(1)/etc/init.d/ap51-flash
  35. $(INSTALL_BIN) ./files/ap51-flash.sh $(1)/usr/lib/ap51-flash/ap51-flash.sh
  36. $(INSTALL_DATA) ./files/ap51-flash.config $(1)/etc/config/ap51-flash
  37. endef
  38. define Package/ap51-flash/conffiles
  39. /etc/config/ap51-flash
  40. endef
  41. $(eval $(call BuildPackage,ap51-flash))