Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ffho-openwrt-migration-tools
  3. PKG_VERSION:=1
  4. PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION)
  5. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  6. include $(INCLUDE_DIR)/package.mk
  7. define Package/ffho-openwrt-migration-tools
  8. SECTION:=ffho
  9. CATEGORY:=Gluon
  10. TITLE:=Toolset of scripts that support the migration from one version of OpenWRT to another.
  11. DEPENDS:=+gluon-core +busybox +hostapd-common +netifd
  12. MAINTAINER:=Freifunk Hochstift <maschinenraum@paderborn.freifunk.net>
  13. URL:=https://git.c3pb.de/freifunk-pb/ffho-packages
  14. SOURCE:=git@git.c3pb.de:freifunk-pb/ffho-packages.git
  15. endef
  16. define Package/ffho-openwrt-migration-tools/description
  17. A collection of scripts that fix and cleanup configurations on a node
  18. when migrating the Gluon base-version of OpenWRT from one major release
  19. to another.
  20. endef
  21. define Build/Prepare
  22. mkdir -p $(PKG_BUILD_DIR)
  23. endef
  24. define Build/Configure
  25. endef
  26. define Build/Compile
  27. endef
  28. define Package/ffho-openwrt-migration-tools/preinst
  29. #!/bin/sh
  30. cd "$${IPKG_INSTROOT}/lib/netifd/wireless/"
  31. if [ -f "mac80211.sh" ] ; then
  32. /bin/rm "./mac80211.sh"
  33. fi
  34. cd "$${IPKG_INSTROOT}/lib/netifd/"
  35. if [ -f "hostapd.sh" ] ; then
  36. /bin/rm "./hostapd.sh"
  37. fi
  38. cd "$${IPKG_INSTROOT}/lib/wifi/"
  39. if [ -f "mac80211.sh" ] ; then
  40. /bin/rm "./mac80211.sh"
  41. fi
  42. exit 0
  43. endef
  44. define Package/ffho-openwrt-migration-tools/install
  45. $(INSTALL_DIR) $(1)/etc/uci-defaults/
  46. $(INSTALL_DIR) $(1)/lib/netifd/wireless/
  47. $(INSTALL_DIR) $(1)/lib/wifi/
  48. $(INSTALL_BIN) ./files/etc/uci-defaults/40-wireless-config-hwmode-fix $(1)/etc/uci-defaults/
  49. $(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless/
  50. $(CP) ./files/lib/netifd/hostapd.sh $(1)/lib/netifd/
  51. $(CP) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi/
  52. endef
  53. $(eval $(call BuildPackage,ffho-openwrt-migration-tools))