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.29' 'kernel26<2.6.30' 'sqlzma' 'zlib')
14 provides=('squashfs-tools')
15 conflicts=('squashfs-tools')
16 arch=('i686' 'x86_64')
17 source=(http://frugalware.org/~janny/source_pkgs/lzma${lzmaver}.tar.bz2 \
18 http://frugalware.org/~janny/source_pkgs/${_realname}${pkgver}.tar.gz \
19 http://frugalware.org/~janny/source_pkgs/sqlzma${pkgver}-${lzmaver}.tar.bz2 \
20 squashfs-lzma.tar.gz \
21 squashfs3.4-include-patch)
22 md5sums=('fc7a12a396ade1772e959604d6eb31e1'
23 '2a4d2995ad5aa6840c95a95ffa6b1da6'
24 '0e7201a040fa9372e9b33f3abdbe19c9'
25 'd7c53db305d77701cd2298e2845adb13'
26 '2ed00248c56672a6664864084011e85a')
27 _kernver='2.6.29-ARCH'
28 _kdir="${pkgdir}"/lib/modules/${_kernver}/kernel/fs/${_realname}
34 echo "applying squashfs3.4-include-patch"
35 cp -Raf /usr/src/linux-$_kernver ${startdir}/src
37 patch -p1 < ../squashfs3.4-include-patch || return 1
38 echo "applying sqlzma2u-3.4.patch"
39 patch -p0 < ${srcdir}/sqlzma2u-3.4.patch || return 1
41 if [ "$CARCH" == "x86_64" ]; then
42 sed -i 's/-Werror//' ${srcdir}/sqlzma1-${lzmaver}.patch || return 1
43 sed -i 's/-Werror//' ${srcdir}/Makefile || return 1
46 echo "applying sqlzma1-${lzmaver}.patch"
47 patch -p1 < "${srcdir}"/sqlzma1-${lzmaver}.patch || return 1
49 cd "${srcdir}" || return 1
52 sed -i "s|KDir =.*|KDir = "${startdir}"/src/linux-$_kernver|" Makefile || return 1
53 sed -i "s|SqFs =.*|SqFs = "${startdir}"/src/squashfs|" Makefile || return 1
54 sed -i "s/LzmaVer =.*/LzmaVer = ./" Makefile || return 1
55 #sed -i "s/C=1/C=0/" Makefile || return 1
60 echo "Installing files"
61 mkdir -p "${pkgdir}"/sbin
62 install -D -m 755 squashfs${pkgver/_/-}/squashfs-tools/{mk,un}squashfs ${pkgdir}/sbin/