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.

86 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. TITLE:=squashfs-tools
  24. URL:=https://github.com/plougher/squashfs-tools
  25. DEPENDS += +libpthread +zlib \
  26. +SQUASHFS_TOOLS_LZO_SUPPORT:liblzo \
  27. +SQUASHFS_TOOLS_LZ4_SUPPORT:liblz4 \
  28. +SQUASHFS_TOOLS_XZ_SUPPORT:liblzma
  29. MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  30. endef
  31. define Package/squashfs-tools-mksquashfs
  32. $(call Package/squashfs-tools/Default)
  33. TITLE+= mksquashfs
  34. endef
  35. define Package/squashfs-tools-unsquashfs
  36. $(call Package/squashfs-tools/Default)
  37. TITLE+= unsquashfs
  38. endef
  39. define Package/squashfs-tools-unsquashfs/config
  40. source "$(SOURCE)/Config.in"
  41. endef
  42. Build/Configure:=
  43. MAKE_FLAGS += \
  44. XATTR_SUPPORT=
  45. ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),)
  46. MAKE_FLAGS += XZ_SUPPORT=1
  47. endif
  48. ifneq ($(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),)
  49. MAKE_FLAGS += LZO_SUPPORT=1
  50. endif
  51. ifneq ($(CONFIG_SQUASHFS_TOOLS_LZ4_SUPPORT),)
  52. MAKE_FLAGS += LZ4_SUPPORT=1
  53. endif
  54. define Build/Compile
  55. $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \
  56. CC="$(TARGET_CC)" \
  57. $(MAKE_FLAGS) \
  58. mksquashfs unsquashfs
  59. endef
  60. define Package/squashfs-tools-mksquashfs/install
  61. $(INSTALL_DIR) $(1)/usr/sbin
  62. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs $(1)/usr/sbin/mksquashfs
  63. endef
  64. define Package/squashfs-tools-unsquashfs/install
  65. $(INSTALL_DIR) $(1)/usr/sbin
  66. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs
  67. endef
  68. $(eval $(call BuildPackage,squashfs-tools-mksquashfs))
  69. $(eval $(call BuildPackage,squashfs-tools-unsquashfs))