package squashfs-tools {
	description = "tools to create and extract Squashfs filesystems"
	website = "https://github.com/plougher/squashfs-tools"
	anitya = 4879

	version# = "4.7.5"
	source = remoteGitHubRelease {
		suffix = "plougher/squashfs-tools"
		tag = version
		name = "squashfs-tools-${version}.tar.gz"
		checksum = "rF52wLQP-jeAmcD-48wqJcck8ZWRFwkax3T-7snaRf5EBnCQQh0YypMY9lwcivLz"
		compress = gzip
	}

	// uses source tree as scratch space
	writable
	chmod

	env = [
		"CONFIG=1"
		"XZ_SUPPORT=0"
		"LZO_SUPPORT=0"
		"LZ4_SUPPORT=0"
		"COMP_DEFAULT=zstd"
		"USE_PREBUILT_MANPAGES=y"
	]

	early = "cd squashfs-tools"

	exec = make {
		skipConfigure
		inPlace

		skipCheck
		install = "make INSTALL_PREFIX=/work/system install"
	}

	inputs = [
		sed

		zstd
		gzip
		zlib
	]

	runtime = [
		zstd
		gzip
		zlib
	]
}
