Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ffpb-node-tuning
  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-node-tuning
  8. SECTION:=ffpb
  9. CATEGORY:=Gluon
  10. TITLE:=Freifunk Paderborn Node Tuning-Settings
  11. DEPENDS:=+gluon-core +busybox
  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-node-tuning/description
  17. As its name states, this packages applies some config optimizations (like
  18. tweaking kernal knobs via sysctl) on the nodes.
  19. For the most knobs Gluon sticks for OpenWRT defaults for good reasons, as
  20. some values need to be set according to the environment of the nodes (e.g.
  21. the network's size). As OpenWRT basically aims at providing a stable system
  22. for standalone WiFi access-points, the system's default configuration may
  23. not be appropriate anymore the larger the network grows, though.
  24. endef
  25. define Build/Prepare
  26. mkdir -p $(PKG_BUILD_DIR)
  27. endef
  28. define Build/Configure
  29. endef
  30. define Build/Compile
  31. endef
  32. define Package/ffpb-node-tuning/postinst
  33. #!/bin/sh
  34. mkdir -p "$${IPKG_INSTROOT}/lib/gluon/version/"
  35. cd "$${IPKG_INSTROOT}/lib/gluon/version/"
  36. echo $(PKG_VERSION)-$(PKG_RELEASE) > node-tuning
  37. exit 0
  38. endef
  39. define Package/ffpb-node-tuning/install
  40. $(INSTALL_DIR) $(1)/etc/uci-defaults/
  41. $(INSTALL_DIR) $(1)/lib/gluon/upgrade/node-tuning/invariant/
  42. $(INSTALL_BIN) ./files/etc/uci-defaults/zz~-ffpb-upgrade $(1)/etc/uci-defaults/
  43. $(INSTALL_BIN) ./files//lib/gluon/upgrade/node-tuning/invariant/010-arp_caches $(1)/lib/gluon/upgrade/node-tuning/invariant/
  44. $(INSTALL_BIN) ./files//lib/gluon/upgrade/node-tuning/invariant/099-apply_settings $(1)/lib/gluon/upgrade/node-tuning/invariant/
  45. endef
  46. $(eval $(call BuildPackage,ffpb-node-tuning))