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.

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