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.

87 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2016 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:=squashfs-tools
  9. PKG_VERSION:=4.3
  10. PKG_RELEASE:=3
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_LICENSE_FILES:=COPYING
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE_VERSION:=9c1db6d13a51a2e009f0027ef336ce03624eac0d
  17. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/squashfs-tools/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. SUBMENU:=Filesystem
  24. TITLE:=squashfs-tools
  25. URL:=https://github.com/plougher/squashfs-tools
  26. DEPENDS += +libpthread +zlib \
  27. +SQUASHFS_TOOLS_LZO_SUPPORT:liblzo \
  28. +SQUASHFS_TOOLS_LZ4_SUPPORT:liblz4 \
  29. +SQUASHFS_TOOLS_XZ_SUPPORT:liblzma
  30. MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  31. endef
  32. define Package/squashfs-tools-mksquashfs
  33. $(call Package/squashfs-tools/Default)
  34. TITLE+= mksquashfs
  35. endef
  36. define Package/squashfs-tools-unsquashfs
  37. $(call Package/squashfs-tools/Default)
  38. TITLE+= unsquashfs
  39. endef
  40. define Package/squashfs-tools-unsquashfs/config
  41. source "$(SOURCE)/Config.in"
  42. endef
  43. Build/Configure:=
  44. MAKE_FLAGS += \
  45. XATTR_SUPPORT=
  46. ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),)
  47. MAKE_FLAGS += XZ_SUPPORT=1
  48. endif
  49. ifneq ($(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),)
  50. MAKE_FLAGS += LZO_SUPPORT=1
  51. endif
  52. ifneq ($(CONFIG_SQUASHFS_TOOLS_LZ4_SUPPORT),)
  53. MAKE_FLAGS += LZ4_SUPPORT=1
  54. endif
  55. define Build/Compile
  56. $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \
  57. CC="$(TARGET_CC)" \
  58. $(MAKE_FLAGS) \
  59. mksquashfs unsquashfs
  60. endef
  61. define Package/squashfs-tools-mksquashfs/install
  62. $(INSTALL_DIR) $(1)/usr/sbin
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs $(1)/usr/sbin/mksquashfs
  64. endef
  65. define Package/squashfs-tools-unsquashfs/install
  66. $(INSTALL_DIR) $(1)/usr/sbin
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs
  68. endef
  69. $(eval $(call BuildPackage,squashfs-tools-mksquashfs))
  70. $(eval $(call BuildPackage,squashfs-tools-unsquashfs))