summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 714355cdf03115b80f13eb2fc2869154fa76df8a (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer: "UnCO Lin" <trash__box <at> 163.com>
# Contributor: PLum <plum.michalski <at> gmail.com>
pkgname=pcompress-git
_pkgname=pcompress
pkgver=434
_wavpack_ver=4.70.0
pkgrel=1
arch=(x86_64)
pkgdesc="Pcompress is a utility to do compression/decompression and deduplication in parallel by splitting input data into chunks."
url="http://moinakg.github.io/pcompress/"
license=('LGPL v3')
options=('!makeflags')
depends=('glibc' 'gcc-libs-multilib' 'bzip2' 'zlib' 'openssl-1.0')
makedepends=('git' 'yasm')
source=("git+https://github.com/moinakg/${_pkgname}.git"
        "http://wavpack.com/wavpack-${_wavpack_ver}.tar.bz2"
        "openssl.patch::https://github.com/moinakg/pcompress/pull/55.patch"
        "gcc11.patch::https://github.com/moinakg/pcompress/pull/56.patch")
md5sums=('SKIP'
         '4c0186ef0dc8367ce5cd7cc0f398b714'
         '22f1a4e1bf373c6f6b86c49f70ee3be3'
         '16a91b9f94f56a4981d18aa6c7bfdfdd')

pkgver() {
  cd "$_pkgname"
  git rev-list --count HEAD
}

prepare() {
  cd "$_pkgname"
  git apply -v ${srcdir}/{openssl,gcc11}.patch
}

build() {
  cd "$_pkgname"

# ./config flags:
# --prefix=<val>          The installation prefix (default: /usr).
# --enable-debug          Enable debug mode compilation (default: disabled).
# --disable-allocator     Disable use of internal memory allocator mechanism (default: enabled).
# --enable-debug-stats    Enable printing of some verbose debug info (default: disabled).
# --with-openssl=<path to OpenSSL installation tree> (Default: System)
# --with-zlib=<path to zlib installation tree> (Default: System)
# --with-bzlib=<path to Bzip2 library installation tree> (Default: System)
# --with-external-libbsc=<path to libbsc source tree>
# --wavpack-dir=<path to WavPack source tree>
# --disable-wavpack       Disables the WavPack filter.
# --no-sse-detect         Do NOT attempt to probe the system`s SSE capability for build flags.
# --no-avx-detect         Do NOT attempt to probe the system's AVX capability for build flags.
# --no-1.3-archive-compat Disable compatibility with compressed archives created with Pcompress
# --limit-key128          Limit key length to 128-bit encryption keys.

  if check_option "debug" "y"; then
    _config_flags+=('--enable-debug')
  fi
  ./config --prefix=/usr \
    --wavpack-dir="$srcdir"/wavpack-${_wavpack_ver} \
    --with-openssl-incdir="/usr/include/openssl-1.0" \
    --with-openssl-libdir="/usr/lib/openssl-1.0" \
    "${_config_flags[@]}"
  make
}

package() {
  cd "$_pkgname"
  make DESTDIR=${pkgdir} install
}