Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ffpb-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/ffpb-openwrt-migration-tools
  8. SECTION:=ffpb
  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 Paderborn <maschinenraum@paderborn.freifunk.net>
  13. URL:=https://git.c3pb.de/freifunk-pb/ffpb-packages
  14. SOURCE:=git@git.c3pb.de:freifunk-pb/ffpb-packages.git
  15. endef
  16. define Package/ffpb-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/ffpb-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/ffpb-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/90-tlwr1043ndv2-autoupdater-to-stable $(1)/etc/uci-defaults/
  49. $(INSTALL_BIN) ./files/etc/uci-defaults/40-wireless-config-hwmode-fix $(1)/etc/uci-defaults/
  50. $(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless/
  51. $(CP) ./files/lib/netifd/hostapd.sh $(1)/lib/netifd/
  52. $(CP) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi/
  53. endef
  54. $(eval $(call BuildPackage,ffpb-openwrt-migration-tools))