2 # Copyright (C) 2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
10 PKG_NAME:=squashfs-tools
14 PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/squashfs
16 PKG_MD5SUM:=1b7a781fb4cf8938842279bd3e8ee852
21 PKG_BUILD_DIR:=$(BUILD_DIR)/squashfs$(PKG_VERSION)
23 include $(INCLUDE_DIR)/package.mk
25 define Package/squashfs-tools/Default
29 DEPENDS += +libpthread +zlib
32 define Package/squashfs-tools-mksquashfs
33 $(call Package/squashfs-tools/Default)
37 define Package/squashfs-tools-unsquashfs
38 $(call Package/squashfs-tools/Default)
42 define Package/squashfs-tools-unsquashfs/config
43 source "$(SOURCE)/Config.in"
46 define Build/Configure
49 SQUASHFS_TOOLS_CONFIG := \
52 ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),)
53 SQUASHFS_TOOLS_CONFIG += 'XZ_SUPPORT=1'
56 ifneq ($(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),)
57 SQUASHFS_TOOLS_CONFIG += 'LZO_SUPPORT=1'
61 $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \
63 EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
64 EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
65 $(SQUASHFS_TOOLS_CONFIG) \
69 define Package/squashfs-tools-mksquashfs/install
70 $(INSTALL_DIR) $(1)/usr/sbin
71 $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs $(1)/usr/sbin/mksquashfs
74 define Package/squashfs-tools-unsquashfs/install
75 $(INSTALL_DIR) $(1)/usr/sbin
76 $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs
79 $(eval $(call BuildPackage,squashfs-tools-mksquashfs))
80 $(eval $(call BuildPackage,squashfs-tools-unsquashfs))