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.

90 lines
2.3 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:=5
  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_MIRROR_HASH:=4e9a017561b6f9d7b9782c7c672d224726ffd069b0543f310e85ed8ab1c4589b
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/squashfs-tools/Default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. SUBMENU:=Filesystem
  25. TITLE:=squashfs-tools
  26. URL:=https://github.com/plougher/squashfs-tools
  27. DEPENDS += +libpthread +zlib \
  28. +SQUASHFS_TOOLS_LZO_SUPPORT:liblzo \
  29. +SQUASHFS_TOOLS_LZ4_SUPPORT:liblz4 \
  30. +SQUASHFS_TOOLS_XZ_SUPPORT:liblzma
  31. MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  32. endef
  33. define Package/squashfs-tools-mksquashfs
  34. $(call Package/squashfs-tools/Default)
  35. TITLE+= mksquashfs
  36. endef
  37. define Package/squashfs-tools-unsquashfs
  38. $(call Package/squashfs-tools/Default)
  39. TITLE+= unsquashfs
  40. endef
  41. define Package/squashfs-tools-unsquashfs/config
  42. source "$(SOURCE)/Config.in"
  43. endef
  44. Build/Configure:=
  45. MAKE_FLAGS += \
  46. XATTR_SUPPORT=
  47. ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),)
  48. MAKE_FLAGS += XZ_SUPPORT=1
  49. endif
  50. ifneq ($(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),)
  51. MAKE_FLAGS += LZO_SUPPORT=1
  52. endif
  53. ifneq ($(CONFIG_SQUASHFS_TOOLS_LZ4_SUPPORT),)
  54. MAKE_FLAGS += LZ4_SUPPORT=1
  55. endif
  56. define Build/Compile
  57. $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \
  58. CC="$(TARGET_CC)" \
  59. EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  60. EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
  61. $(MAKE_FLAGS) \
  62. mksquashfs unsquashfs
  63. endef
  64. define Package/squashfs-tools-mksquashfs/install
  65. $(INSTALL_DIR) $(1)/usr/sbin
  66. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs $(1)/usr/sbin/mksquashfs
  67. endef
  68. define Package/squashfs-tools-unsquashfs/install
  69. $(INSTALL_DIR) $(1)/usr/sbin
  70. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs
  71. endef
  72. $(eval $(call BuildPackage,squashfs-tools-mksquashfs))
  73. $(eval $(call BuildPackage,squashfs-tools-unsquashfs))