summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a6819c3b530fb3042e734330a1871aabe1f0e78d (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=pigz-git
pkgver=2.7.r4.ge1ed230
pkgrel=1
pkgdesc="A parallel implementation of gzip"
arch=('i686' 'x86_64')
url="https://zlib.net/pigz/"
license=('zlib')
depends=('glibc' 'zlib')
makedepends=('git')
provides=("pigz=$pkgver")
conflicts=('pigz')
source=("git+https://github.com/madler/pigz.git#branch=develop")
sha256sums=('SKIP')


prepare() {
  cd "pigz"

  sed -i 's/^CFLAGS=/CFLAGS?=/g;s/^LDFLAGS=/LDFLAGS?=/g' "Makefile"
}

pkgver() {
  cd "pigz"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "pigz"

  make
}

check() {
  cd "pigz"

  #make test
}

package() {
  cd "pigz"

  install -Dm755 "pigz" -t "$pkgdir/usr/bin"
  ln -s "pigz" "$pkgdir/usr/bin/unpigz"

  install -Dm644 "pigz.1" -t "$pkgdir/usr/share/man/man1"
  install -Dm644 "pigz.pdf" -t "$pkgdir/usr/share/doc"
  install -Dm644 "README" -t "$pkgdir/usr/share/licenses/pigz"
}