summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b93955a302459152f456d054336d658f106a7dba (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
# Maintainer: Dan Ziemba <zman0900@gmail.com>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
# Contributor: Matt Coffin <mcoffin13 at gmail.com>

pkgname=bzip2-git
pkgver=r66.ad723d6
pkgrel=2
pkgdesc="A parallel, SMP-based, bzip2-compatible compression utility"
arch=('i686' 'x86_64')
url="http://lbzip2.org/"
license=('GPL3')
depends=('glibc')
makedepends=('perl' 'git' 'meson' 'ninja')
provides=('bzip2')
conflicts=('bzip2')

_gitname="bzip2"
source=($_gitname'::git+https://gitlab.com/federicomenaquintero/bzip2.git#branch=master')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_gitname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$_gitname"
  meson builddir --prefix=/usr
  ninja -C builddir
}

check() {
  cd "$srcdir/$_gitname"
  meson test -C builddir --print-errorlogs
}

package() {
  cd "$srcdir/$_gitname"
  DESTDIR="$pkgdir" meson install -C builddir

  cd "$pkgdir/usr/lib"
  if [ ! -e libbz2.so.1.0 ]; then
    ln -s libbz2.so.1 libbz2.so.1.0
  fi
}