updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / sqlzma-tools / PKGBUILD
blobb4f8244fdbfd1a4e46bff2848e76f90b15e499c0
1 # Contributor: Jens Pranaitis <jens@jenux.homelinux.org>
2 # Contributor: Janos Kovacs <janny@frugalware.org>
3 # Contributor: VMiklos <vmiklos@frugalware.org>
5 pkgname=sqlzma-tools
6 _realname=squashfs
7 pkgver=3.4
8 lzmaver=457
9 pkgrel=4
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')
13 license=('GPL')
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}
30 build()
32         cd "${srcdir}"
33         ls > foo
34         echo "applying squashfs3.4-include-patch"
35         cp -Raf /usr/src/linux-$_kernver ${startdir}/src
36         cd linux-${_kernver}
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
44         fi
45         
46         echo "applying sqlzma1-${lzmaver}.patch"
47         patch -p1 < "${srcdir}"/sqlzma1-${lzmaver}.patch || return 1
48         
49         cd "${srcdir}" || return 1
50         
51         echo "sed Makefile"
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
56         
57         echo "Compiling"
58         make || return 1
59         
60         echo "Installing files"
61         mkdir -p "${pkgdir}"/sbin
62         install -D -m 755 squashfs${pkgver/_/-}/squashfs-tools/{mk,un}squashfs ${pkgdir}/sbin/