1 # Contributor: Jens Pranaitis <jens@jenux.homelinux.org>
2 # Contributor: Janos Kovacs <janny@frugalware.org>
3 # Contributor: VMiklos <vmiklos@frugalware.org>
10 url="http://www.squashfs-lzma.org"
11 pkgdesc="A highly compressed read-only filesystem for Linux."
12 depends=('kernel26>=2.6.31' 'kernel26<2.6.32' 'zlib')
14 arch=('i686' 'x86_64')
15 source=(#http://frugalware.org/~janny/source_pkgs/lzma${lzmaver}.tar.bz2 \
16 #http://frugalware.org/~janny/source_pkgs/${_realname}${pkgver}.tar.gz \
17 #http://frugalware.org/~janny/source_pkgs/sqlzma${pkgver}-${lzmaver}.tar.bz2
18 lzma${lzmaver}.tar.bz2
19 ${_realname}${pkgver}.tar.gz
20 sqlzma${pkgver}-${lzmaver}.tar.bz2
22 squashfs3.4-include-patch)
23 md5sums=('fc7a12a396ade1772e959604d6eb31e1'
24 '2a4d2995ad5aa6840c95a95ffa6b1da6'
25 '0e7201a040fa9372e9b33f3abdbe19c9'
26 'd7c53db305d77701cd2298e2845adb13'
27 '2ed00248c56672a6664864084011e85a')
28 _kernver='2.6.31-ARCH'
29 _kdir="${pkgdir}"/lib/modules/${_kernver}/kernel/fs/${_realname}
35 echo "applying squashfs3.4-include-patch"
36 cp -R /usr/src/linux-$_kernver ${srcdir}
38 patch -p1 < ../squashfs3.4-include-patch || return 1
40 echo "applying sqlzma2u-3.4.patch"
41 patch -p0 < ${srcdir}/sqlzma2u-3.4.patch || return 1
42 cd ${srcdir}/linux-${_kernver}/include
46 if [ "$CARCH" == "x86_64" ]; then
47 sed -i 's/-Werror//' ${srcdir}/sqlzma1-${lzmaver}.patch || return 1
48 sed -i 's/-Werror//' ${srcdir}/Makefile || return 1
51 echo "applying sqlzma1-${lzmaver}.patch"
52 patch -p1 < "${srcdir}"/sqlzma1-${lzmaver}.patch || return 1
53 cd "${srcdir}" || return 1
56 sed -i "s|KDir =.*|KDir = "${srcdir}"/linux-$_kernver|" Makefile || return 1
57 sed -i "s|SqFs =.*|SqFs = "${srcdir}"/squashfs|" Makefile || return 1
58 sed -i "s/LzmaVer =.*/LzmaVer = ./" Makefile || return 1
59 #sed -i "s/C=1/C=0/" Makefile || return 1
64 echo "Installing files"
66 install -D -m 644 "${srcdir}/squashfs/squashfs.ko" "${_kdir}"
67 install -D -m 644 C/Compress/Lzma/kmod/{un,sq}lzma.ko "${_kdir}"