diff options
author | Erwin Rol <erwin@erwinrol.com> | 2010-02-27 00:16:03 +0100 |
---|---|---|
committer | Erwin Rol <erwin@erwinrol.com> | 2010-03-22 22:46:49 +0100 |
commit | daa0ff7dad3892f2e031a6457325fe554ccbae95 (patch) | |
tree | fdf9d52449f5a70c65465c7f36070f2b9da8a717 | |
parent | b55110fa96f1b64baba02dee0a45a5d05d271d8a (diff) | |
download | ptxdist-daa0ff7dad3892f2e031a6457325fe554ccbae95.tar.gz ptxdist-daa0ff7dad3892f2e031a6457325fe554ccbae95.tar.xz |
[squashfs] Add target version
- Adds a target version of squashf-tools
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
-rw-r--r-- | patches/squashfs3.4/series | 1 | ||||
-rw-r--r-- | patches/squashfs3.4/squashfs_libs.diff | 34 | ||||
-rw-r--r-- | patches/squashfs4.0/series | 1 | ||||
-rw-r--r-- | patches/squashfs4.0/squashfs_libs.diff | 34 | ||||
-rw-r--r-- | rules/host-squashfs-tools.make | 15 | ||||
-rw-r--r-- | rules/squashfs-tools.in | 24 | ||||
-rw-r--r-- | rules/squashfs-tools.make | 76 |
7 files changed, 171 insertions, 14 deletions
diff --git a/patches/squashfs3.4/series b/patches/squashfs3.4/series new file mode 100644 index 000000000..de458cdb8 --- /dev/null +++ b/patches/squashfs3.4/series @@ -0,0 +1 @@ +squashfs_libs.diff diff --git a/patches/squashfs3.4/squashfs_libs.diff b/patches/squashfs3.4/squashfs_libs.diff new file mode 100644 index 000000000..962c8ef1f --- /dev/null +++ b/patches/squashfs3.4/squashfs_libs.diff @@ -0,0 +1,34 @@ +Subject: Add way to change linker settings +From: Erwin Rol <erwin@erwinrol.com> + +When cross compiling the linker can not find libz, this patch +adds a LIBS variable that makes it possible to pass the right +linker flags. + +Signed-off-by: Erwin Rol <erwin@erwinrol.com> + +--- squashfs3.4/squashfs-tools/Makefile.orig 2010-02-27 00:01:56.000000000 +0100 ++++ squashfs3.4/squashfs-tools/Makefile 2010-02-27 00:02:46.000000000 +0100 +@@ -4,10 +4,12 @@ + + CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 + ++LIBS := -lz -lpthread -lm ++ + all: mksquashfs unsquashfs + + mksquashfs: mksquashfs.o read_fs.o sort.o +- $(CC) mksquashfs.o read_fs.o sort.o -lz -lpthread -lm -o $@ ++ $(CC) mksquashfs.o read_fs.o sort.o $(LIBS) $(LDFLAGS)-o $@ + + mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h + +@@ -16,7 +18,7 @@ + sort.o: sort.c squashfs_fs.h global.h sort.h + + unsquashfs: unsquashfs.o +- $(CC) unsquashfs.o -lz -lpthread -lm -o $@ ++ $(CC) unsquashfs.o $(LIBS) $(LDFLAGS)-o $@ + + unsquashfs.o: unsquashfs.c squashfs_fs.h read_fs.h global.h + diff --git a/patches/squashfs4.0/series b/patches/squashfs4.0/series new file mode 100644 index 000000000..de458cdb8 --- /dev/null +++ b/patches/squashfs4.0/series @@ -0,0 +1 @@ +squashfs_libs.diff diff --git a/patches/squashfs4.0/squashfs_libs.diff b/patches/squashfs4.0/squashfs_libs.diff new file mode 100644 index 000000000..541d49d77 --- /dev/null +++ b/patches/squashfs4.0/squashfs_libs.diff @@ -0,0 +1,34 @@ +Subject: Add way to change linker settings +From: Erwin Rol <erwin@erwinrol.com> + +When cross compiling the linker can not find libz, this patch +adds a LIBS variable that makes it possible to pass the right +linker flags. + +Signed-off-by: Erwin Rol <erwin@erwinrol.com> + +--- squashfs4.0/squashfs-tools/Makefile.orig 2010-02-26 13:25:30.000000000 +0100 ++++ squashfs4.0/squashfs-tools/Makefile 2010-02-26 13:26:31.000000000 +0100 +@@ -4,10 +4,12 @@ + + CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 + ++LIBS := -lz -lpthread -lm ++ + all: mksquashfs unsquashfs + + mksquashfs: mksquashfs.o read_fs.o sort.o swap.o pseudo.o +- $(CC) mksquashfs.o read_fs.o sort.o swap.o pseudo.o -lz -lpthread -lm -o $@ ++ $(CC) mksquashfs.o read_fs.o sort.o swap.o pseudo.o $(LIBS) $(LDFLAGS) -o $@ + + mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h squashfs_swap.h Makefile + +@@ -20,7 +22,7 @@ + pseudo.o: pseudo.c pseudo.h Makefile + + unsquashfs: unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o +- $(CC) unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o -lz -lpthread -lm -o $@ ++ $(CC) unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o $(LIBS) $(LDFLAGS) -o $@ + + unsquashfs.o: unsquashfs.h unsquashfs.c squashfs_fs.h squashfs_swap.h squashfs_compat.h global.h Makefile + diff --git a/rules/host-squashfs-tools.make b/rules/host-squashfs-tools.make index 504365fb4..f5ce4768e 100644 --- a/rules/host-squashfs-tools.make +++ b/rules/host-squashfs-tools.make @@ -16,23 +16,10 @@ HOST_PACKAGES-$(PTXCONF_HOST_SQUASHFS_TOOLS) += host-squashfs-tools # # Paths and names # -HOST_SQUASHFS_TOOLS_VERSION := $(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_V3X, 3.4, 4.0) -HOST_SQUASHFS_TOOLS := squashfs$(HOST_SQUASHFS_TOOLS_VERSION) -HOST_SQUASHFS_TOOLS_SUFFIX := tar.gz -HOST_SQUASHFS_TOOLS_URL := $(PTXCONF_SETUP_SFMIRROR)/squashfs/$(HOST_SQUASHFS_TOOLS).$(HOST_SQUASHFS_TOOLS_SUFFIX) -HOST_SQUASHFS_TOOLS_SOURCE := $(SRCDIR)/$(HOST_SQUASHFS_TOOLS).$(HOST_SQUASHFS_TOOLS_SUFFIX) -HOST_SQUASHFS_TOOLS_DIR := $(HOST_BUILDDIR)/$(HOST_SQUASHFS_TOOLS) +HOST_SQUASHFS_TOOLS_DIR = $(HOST_BUILDDIR)/$(SQUASHFS_TOOLS) HOST_SQUASHFS_TOOLS_SUBDIR := squashfs-tools # ---------------------------------------------------------------------------- -# Get -# ---------------------------------------------------------------------------- - -$(HOST_SQUASHFS_TOOLS_SOURCE): - @$(call targetinfo) - @$(call get, HOST_SQUASHFS_TOOLS) - -# ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- diff --git a/rules/squashfs-tools.in b/rules/squashfs-tools.in new file mode 100644 index 000000000..8e174021f --- /dev/null +++ b/rules/squashfs-tools.in @@ -0,0 +1,24 @@ +## SECTION=disk_and_file + +menuconfig SQUASHFS_TOOLS + tristate + select ZLIB + prompt "squashfs-tools" + help + Squashfs is a highly compressed read-only filesystem for Linux. + It uses zlib compression to compress both files, inodes and directories. + Inodes in the system are very small and all blocks are packed to minimise + data overhead. Block sizes greater than 4K are supported up to a maximum + of 1Mbytes (default block size 128K). + +if SQUASHFS_TOOLS + +config SQUASHFS_TOOLS_MKSQUASHFS + bool + prompt "Install mksquashfs" + +config SQUASHFS_TOOLS_UNSQUASHFS + bool + prompt "Install unsquashfs" + +endif diff --git a/rules/squashfs-tools.make b/rules/squashfs-tools.make new file mode 100644 index 000000000..ef25b6c2a --- /dev/null +++ b/rules/squashfs-tools.make @@ -0,0 +1,76 @@ +# -*-makefile-*- +# +# Copyright (C) 2010 by Erwin Rol +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_SQUASHFS_TOOLS) += squashfs-tools + +# +# Paths and names +# +SQUASHFS_TOOLS_VERSION := $(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_V3X, 3.4, 4.0) +SQUASHFS_TOOLS := squashfs$(SQUASHFS_TOOLS_VERSION) +SQUASHFS_TOOLS_SUFFIX := tar.gz +SQUASHFS_TOOLS_URL := $(PTXCONF_SETUP_SFMIRROR)/squashfs/$(SQUASHFS_TOOLS).$(SQUASHFS_TOOLS_SUFFIX) +SQUASHFS_TOOLS_SOURCE := $(SRCDIR)/$(SQUASHFS_TOOLS).$(SQUASHFS_TOOLS_SUFFIX) +SQUASHFS_TOOLS_DIR := $(BUILDDIR)/$(SQUASHFS_TOOLS) +SQUASHFS_TOOLS_SUBDIR := squashfs-tools +SQUASHFS_TOOLS_LICENSE := unknown + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(SQUASHFS_TOOLS_SOURCE): + @$(call targetinfo) + @$(call get, SQUASHFS_TOOLS) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +SQUASHFS_TOOLS_MAKE_PAR := NO +SQUASHFS_TOOLS_MAKE_OPT := \ + $(CROSS_ENV) + +SQUASHFS_TOOLS_INSTALL_OPT := \ + INSTALL_DIR="$(SQUASHFS_TOOLS_PKGDIR)/usr/sbin" \ + install + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/squashfs-tools.targetinstall: + @$(call targetinfo) + + @$(call install_init, squashfs-tools) + @$(call install_fixup, squashfs-tools,PACKAGE,squashfs-tools) + @$(call install_fixup, squashfs-tools,PRIORITY,optional) + @$(call install_fixup, squashfs-tools,VERSION,$(SQUASHFS_TOOLS_VERSION)) + @$(call install_fixup, squashfs-tools,SECTION,base) + @$(call install_fixup, squashfs-tools,AUTHOR,"Erwin Rol") + @$(call install_fixup, squashfs-tools,DEPENDS,) + @$(call install_fixup, squashfs-tools,DESCRIPTION,missing) + + +ifdef PTXCONF_SQUASHFS_TOOLS_MKSQUASHFS + @$(call install_copy, squashfs-tools, 0, 0, 0755, -, /usr/sbin/mksquashfs) +endif +ifdef PTXCONF_SQUASHFS_TOOLS_UNSQUASHFS + @$(call install_copy, squashfs-tools, 0, 0, 0755, -, /usr/sbin/unsquashfs) +endif + + @$(call install_finish, squashfs-tools) + + @$(call touch) + +# vim: syntax=make |