Changeset 36317


Ignore:
Timestamp:
2013-04-12T11:43:51+02:00 (5 years ago)
Author:
luka
Message:

[packages] squashfs-tools: modularize package

Location:
packages/utils/squashfs-tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/utils/squashfs-tools/Config.in

    r36310 r36317  
    1 if PACKAGE_squashfs-tools 
     1if PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs 
    22 
    3 config SQUASHFS_TOOLS_MKSQUASHFS 
    4         bool "Install mksquashfs" 
     3config SQUASHFS_TOOLS_LZO_SUPPORT 
     4        bool "Enable LZO support" 
    55        default y 
    66 
    7 config SQUASHFS_TOOLS_UNSQUASHFS 
    8         bool "Install unsquashfs" 
     7config SQUASHFS_TOOLS_XZ_SUPPORT 
     8        bool "Enable XZ support" 
    99        default y 
    1010 
  • packages/utils/squashfs-tools/Makefile

    r36310 r36317  
    1010PKG_NAME:=squashfs-tools 
    1111PKG_VERSION:=4.2 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz 
    1515PKG_SOURCE_URL:=@SF/squashfs 
    1616PKG_MD5SUM:=1b7a781fb4cf8938842279bd3e8ee852 
     17 
    1718PKG_CAT:=zcat 
     19PKG_BUILD_PARALLEL:=1 
    1820 
    1921PKG_BUILD_DIR:=$(BUILD_DIR)/squashfs$(PKG_VERSION) 
     
    2123include $(INCLUDE_DIR)/package.mk 
    2224 
    23 define Package/squashfs-tools 
     25define Package/squashfs-tools/Default 
    2426  SECTION:=utils 
    2527  CATEGORY:=Utilities 
    2628  TITLE:=squashfs-tools 
    27   DEPENDS+= +libpthread +zlib 
    28   MENU:=1 
     29  DEPENDS += +libpthread +zlib \ 
     30        +SQUASHFS_TOOLS_LZO_SUPPORT:liblzo \ 
     31        +SQUASHFS_TOOLS_XZ_SUPPORT:liblzma 
    2932endef 
    3033 
    31 define Package/squashfs-tools/config 
     34define Package/squashfs-tools-mksquashfs 
     35  $(call Package/squashfs-tools/Default) 
     36  TITLE+= mksquashfs 
     37endef 
     38 
     39define Package/squashfs-tools-unsquashfs 
     40  $(call Package/squashfs-tools/Default) 
     41  TITLE+= unsquashfs 
     42endef 
     43 
     44define Package/squashfs-tools-unsquashfs/config 
    3245        source "$(SOURCE)/Config.in" 
    3346endef 
     
    3649endef 
    3750 
     51SQUASHFS_TOOLS_CONFIG := \ 
     52        'XATTR_SUPPORT=' 
     53 
     54ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),) 
     55SQUASHFS_TOOLS_CONFIG += 'XZ_SUPPORT=1' 
     56endif 
     57 
     58ifneq ($(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),) 
     59SQUASHFS_TOOLS_CONFIG += 'LZO_SUPPORT=1' 
     60endif 
     61 
    3862define Build/Compile 
    3963        $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \ 
     
    4165                EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ 
    4266                EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ 
    43                 XATTR_SUPPORT= \ 
     67                $(SQUASHFS_TOOLS_CONFIG) \ 
    4468                mksquashfs unsquashfs 
    4569endef 
    4670 
    47 define Package/squashfs-tools/install 
     71define Package/squashfs-tools-mksquashfs/install 
    4872        $(INSTALL_DIR) $(1)/usr/sbin 
    49 ifeq ($(CONFIG_SQUASHFS_TOOLS_MKSQUASHFS),y) 
    5073        $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs $(1)/usr/sbin/mksquashfs 
    51 endif 
    52 ifeq ($(CONFIG_SQUASHFS_TOOLS_UNSQUASHFS),y) 
    53         $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs 
    54 endif 
    5574endef 
    5675 
    57 $(eval $(call BuildPackage,squashfs-tools)) 
     76define Package/squashfs-tools-unsquashfs/install 
     77        $(INSTALL_DIR) $(1)/usr/sbin 
     78        $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs 
     79endef 
     80 
     81$(eval $(call BuildPackage,squashfs-tools-mksquashfs)) 
     82$(eval $(call BuildPackage,squashfs-tools-unsquashfs)) 
Note: See TracChangeset for help on using the changeset viewer.