[packages] squashfs-tools: add new package
[openwrt/svn-archive/archive.git] / utils / squashfs-tools / Makefile
1 #
2 # Copyright (C) 2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=squashfs-tools
11 PKG_VERSION:=4.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/squashfs
16 PKG_MD5SUM:=1b7a781fb4cf8938842279bd3e8ee852
17 PKG_CAT:=zcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/squashfs$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/squashfs-tools
24 SECTION:=utils
25 CATEGORY:=Utilities
26 TITLE:=squashfs-tools
27 DEPENDS+= +libpthread +zlib
28 MENU:=1
29 endef
30
31 define Package/squashfs-tools/config
32 source "$(SOURCE)/Config.in"
33 endef
34
35 define Build/Configure
36 endef
37
38 define Build/Compile
39 $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \
40 CC="$(TARGET_CC)" \
41 EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
42 EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
43 XATTR_SUPPORT= \
44 mksquashfs unsquashfs
45 endef
46
47 define Package/squashfs-tools/install
48 $(INSTALL_DIR) $(1)/usr/sbin
49 ifeq ($(CONFIG_SQUASHFS_TOOLS_MKSQUASHFS),y)
50 $(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
55 endef
56
57 $(eval $(call BuildPackage,squashfs-tools))