# HG changeset patch # User Christopher Rogers # Date 1286763422 0 # Node ID fbe11f5b74e355558280a2babb42a6d68f3f806c # Parent 5fa2da48d92f46cd915ae5ac651d525a06be0254 Added linux-api-headers. This is like linux-headers but it doesn't depend on linux to be build. Also this means we can update the kernel without rebuild the toolchain. diff -r 5fa2da48d92f -r fbe11f5b74e3 linux-api-headers/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux-api-headers/receipt Mon Oct 11 02:17:02 2010 +0000 @@ -0,0 +1,41 @@ +# SliTaz package receipt. + +PACKAGE="linux-api-headers" +VERSION="2.6.34" +CATEGORY="development" +SHORT_DESC="Kernel headers sanitized for use in userspace." +MAINTAINER="devel@slitaz.org" +SOURCE="linux" +TARBALL="$SOURCE-$VERSION.tar.bz2" +BUILD_DEPENDS="perl" +WEB_SITE="http://www.kernel.org/" +WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v${VERSION:0:3}/$TARBALL" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + + # fix issues with transition of scsi.h from glibc + patch -Np1 -i ../stuff/scsi.patch + + make mrproper + make headers_check + make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr + cp -a $_pkg/usr/include $fs/usr + + rm -f $(find ${fs} -name .install -or -name ..install.cmd) +} + +# Post install commands for Tazpkg. +post_install() +{ + # Removed old linux-headers + rm -rf $1/var/lib/tazpkg/installed/linux-headers 2>/dev/null +} diff -r 5fa2da48d92f -r fbe11f5b74e3 linux-api-headers/stuff/scsi.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux-api-headers/stuff/scsi.patch Mon Oct 11 02:17:02 2010 +0000 @@ -0,0 +1,42 @@ +diff -Naur linux-2.6.32-old/include/scsi/scsi.h linux-2.6.32/include/scsi/scsi.h +--- linux-2.6.32-old/include/scsi/scsi.h 2009-12-03 13:51:21.000000000 +1000 ++++ linux-2.6.32/include/scsi/scsi.h 2009-12-12 10:43:11.000000000 +1000 +@@ -145,14 +145,15 @@ + + /* defined in T10 SCSI Primary Commands-2 (SPC2) */ + struct scsi_varlen_cdb_hdr { +- u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ +- u8 control; +- u8 misc[5]; +- u8 additional_cdb_length; /* total cdb length - 8 */ ++ __u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ ++ __u8 control; ++ __u8 misc[5]; ++ __u8 additional_cdb_length; /* total cdb length - 8 */ + __be16 service_action; + /* service specific data follows */ + }; + ++#ifdef __KERNEL__ + static inline unsigned + scsi_varlen_cdb_length(const void *hdr) + { +@@ -168,6 +169,7 @@ + return (cmnd[0] == VARIABLE_LENGTH_CMD) ? + scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); + } ++#endif + + /* + * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft +@@ -284,8 +286,10 @@ + SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */ + }; + ++#ifdef __KERNEL__ + /* Returns a human-readable name for the device */ + extern const char * scsi_device_type(unsigned type); ++#endif + + /* + * standard mode-select header prepended to all mode-select commands diff -r 5fa2da48d92f -r fbe11f5b74e3 linux-headers/receipt --- a/linux-headers/receipt Mon Oct 11 01:06:19 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -# SliTaz package receipt. - -PACKAGE="linux-headers" -VERSION="2.6.34" -CATEGORY="development" -SHORT_DESC="The Linux Kernel headers files for devel." -MAINTAINER="devel@slitaz.org" -WANTED="linux" -WEB_SITE="http://www.kernel.org/" - -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ - mkdir -p $fs/usr - cp -a $_pkg/usr/include $fs/usr -} diff -r 5fa2da48d92f -r fbe11f5b74e3 linux/receipt --- a/linux/receipt Mon Oct 11 01:06:19 2010 +0000 +++ b/linux/receipt Mon Oct 11 02:17:02 2010 +0000 @@ -52,7 +52,6 @@ aufs2-standalone.patch $PACKAGE-freeinitrd-$VERSION.u $PACKAGE-squashfs-lzma-$VERSION.u -scsi.patch EOT make mrproper cd Documentation/lguest diff -r 5fa2da48d92f -r fbe11f5b74e3 linux/stuff/scsi.patch --- a/linux/stuff/scsi.patch Mon Oct 11 01:06:19 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -diff -Naur linux-2.6.32-old/include/scsi/scsi.h linux-2.6.32/include/scsi/scsi.h ---- linux-2.6.32-old/include/scsi/scsi.h 2009-12-03 13:51:21.000000000 +1000 -+++ linux-2.6.32/include/scsi/scsi.h 2009-12-12 10:43:11.000000000 +1000 -@@ -145,14 +145,15 @@ - - /* defined in T10 SCSI Primary Commands-2 (SPC2) */ - struct scsi_varlen_cdb_hdr { -- u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ -- u8 control; -- u8 misc[5]; -- u8 additional_cdb_length; /* total cdb length - 8 */ -+ __u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ -+ __u8 control; -+ __u8 misc[5]; -+ __u8 additional_cdb_length; /* total cdb length - 8 */ - __be16 service_action; - /* service specific data follows */ - }; - -+#ifdef __KERNEL__ - static inline unsigned - scsi_varlen_cdb_length(const void *hdr) - { -@@ -168,6 +169,7 @@ - return (cmnd[0] == VARIABLE_LENGTH_CMD) ? - scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); - } -+#endif - - /* - * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft -@@ -284,8 +286,10 @@ - SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */ - }; - -+#ifdef __KERNEL__ - /* Returns a human-readable name for the device */ - extern const char * scsi_device_type(unsigned type); -+#endif - - /* - * standard mode-select header prepended to all mode-select commands diff -r 5fa2da48d92f -r fbe11f5b74e3 slitaz-dev-pkgs/receipt --- a/slitaz-dev-pkgs/receipt Mon Oct 11 01:06:19 2010 +0000 +++ b/slitaz-dev-pkgs/receipt Mon Oct 11 02:17:02 2010 +0000 @@ -8,7 +8,7 @@ WEB_SITE="http://www.slitaz.org/" DEPENDS=" binutils -linux-headers +linux-api-headers gcc make bzip2-dev diff -r 5fa2da48d92f -r fbe11f5b74e3 slitaz-toolchain/receipt --- a/slitaz-toolchain/receipt Mon Oct 11 01:06:19 2010 +0000 +++ b/slitaz-toolchain/receipt Mon Oct 11 02:17:02 2010 +0000 @@ -5,7 +5,7 @@ CATEGORY="meta" SHORT_DESC="SliTaz toolchain meta package for devel." MAINTAINER="pankso@slitaz.org" -DEPENDS="binutils linux-headers glibc-dev gcc make" +DEPENDS="binutils linux-api-headers glibc-dev gcc make" WEB_SITE="http://www.slitaz.org/" # Rules to gen a SliTaz package suitable for Tazpkg.