Makefile 970 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Copyright (C) 2013-2021 OpenWrt.org
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=zram-swap
  6. PKG_RELEASE:=32
  7. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  8. include $(INCLUDE_DIR)/package.mk
  9. define Package/zram-swap
  10. SECTION:=utils
  11. CATEGORY:=Base system
  12. DEPENDS:= \
  13. +@BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD \
  14. +@BUSYBOX_CONFIG_FEATURE_SWAPON_PRI \
  15. +@BUSYBOX_CONFIG_MKSWAP \
  16. +@BUSYBOX_CONFIG_SWAPOFF \
  17. +@BUSYBOX_CONFIG_SWAPON \
  18. +kmod-zram
  19. TITLE:=ZRAM swap scripts
  20. PKGARCH:=all
  21. endef
  22. define Package/zram-swap/description
  23. A script to activate swaping on a compressed zram partition. This
  24. could be used to increase the available memory, by using compressed
  25. memory.
  26. endef
  27. define Build/Prepare
  28. endef
  29. define Build/Configure
  30. endef
  31. define Build/Compile
  32. endef
  33. define Package/zram-swap/install
  34. $(INSTALL_DIR) $(1)/etc/init.d
  35. $(INSTALL_BIN) ./files/zram.init $(1)/etc/init.d/zram
  36. endef
  37. $(eval $(call BuildPackage,zram-swap))