tools/squashfs4: add new tool for squashfs4 images
[openwrt/staging/dedeckeh.git] / tools / squashfs4 / Makefile
1 #
2 # Copyright (C) 2006-2012 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
9 PKG_NAME:=squashfs4
10 PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
11 PKG_VERSION:=4.5.1
12 PKG_RELEASE=1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools
16 PKG_SOURCE_DATE:=2022-03-17
17 PKG_SOURCE_VERSION:=afdd63fc386919b4aa40d573b0a6069414d14317
18 PKG_MIRROR_HASH:=caedb66cf6dcbdcee0d1525923e203d003ef15f34a13a328686794666f16171f
19
20 include $(INCLUDE_DIR)/host-build.mk
21
22 define Host/Compile
23 +$(HOST_MAKE_VARS) \
24 $(MAKE) -C $(HOST_BUILD_DIR)/squashfs-tools \
25 XZ_SUPPORT=1 \
26 LZMA_XZ_SUPPORT=1 \
27 EXTRA_CFLAGS="-I$(STAGING_DIR_HOST)/include" \
28 mksquashfs unsquashfs
29 endef
30
31 define Host/Install
32 $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs $(STAGING_DIR_HOST)/bin/mksquashfs4
33 $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs $(STAGING_DIR_HOST)/bin/unsquashfs4
34 endef
35
36 define Host/Clean
37 rm -f $(STAGING_DIR_HOST)/bin/mksquashfs4
38 rm -f $(STAGING_DIR_HOST)/bin/unsquashfs4
39 endef
40
41 $(eval $(call HostBuild))