summaryrefslogtreecommitdiff
path: root/core/libarchive/PKGBUILD
blob: 2c9e5920065b245c70b0a1fb8571ced308abb008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# $Id: PKGBUILD 201474 2013-12-12 15:40:49Z dreisner $
# Maintainer: Dan McGee <dan@archlinux.org>

pkgname=libarchive
pkgver=3.1.2
pkgrel=4
pkgdesc="library that can create and read several streaming archive formats"
arch=('i686' 'x86_64' 'mips64el')
url="http://libarchive.org/"
license=('BSD')
depends=('acl' 'attr' 'bzip2' 'expat' 'lzo2' 'openssl' 'xz' 'zlib')
options=('strip' 'debug' 'libtool')
provides=('libarchive.so')
source=("http://libarchive.org/downloads/$pkgname-$pkgver.tar.gz"
        '0001-mtree-fix-line-filename-length-calculation.patch'
        https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4.patch
        'libarchive-3.1.2-acl.patch')
md5sums=('efad5a503f66329bb9d2f4308b5de98a'
         'fda89c145bbcd793a96b06b463ef6a72'
         '6a63086b1a2e540d74ca6dc240dbd021'
         'a5c995661c62429ceff2c23ea322393b')

build() {
  cd "$pkgname-$pkgver"

  # https://code.google.com/p/libarchive/issues/detail?id=301
  # upstream commit e65bf287f0133426b26611fe3e80b51267987106
  patch -Np1 -i "$srcdir/0001-mtree-fix-line-filename-length-calculation.patch"

  # https://code.google.com/p/libarchive/issues/detail?id=329
  patch -Np1 -i "$srcdir/libarchive-3.1.2-acl.patch"

  # CVE-2013-0211
  patch -Np1 -i "$srcdir/22531545514043e04633e1c015c7540b9de9dbe4.patch"

  ./configure --prefix=/usr --without-xml2
  make
}

check() {
  cd "$pkgname-$pkgver"

  make check
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install

  install -D -m644 COPYING "$pkgdir"/usr/share/licenses/libarchive/COPYING
}