1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 # Contributor: Lex Black <autumn-wind at web dot de>
4 # Contributor: TingPing <tingping@tingping.se>
5 # Contributor: Guillaume Horel <guillaume.horel@gmail.com>
8 pkgname=('brotli' 'python-brotli' 'brotli-testdata')
9 _gitcommit=e61745a6b7add50d380cfd7d3883dd6c62fc2c71
12 pkgdesc='Generic-purpose lossless compression algorithm'
13 url='https://github.com/google/brotli'
16 makedepends=('git' 'glibc' 'gcc-libs' 'cmake' 'python-setuptools')
17 source=(${pkgname}::"git+${url}#commit=${_gitcommit}")
22 git cherry-pick -n 09b0992b6acb7faa6fd3b23f9bc036ea117230fc # Fix broken Libs: in pc file
27 git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
34 -DCMAKE_BUILD_TYPE=Release \
35 -DCMAKE_INSTALL_PREFIX=/usr \
36 -DCMAKE_INSTALL_LIBDIR=lib \
37 -DBUILD_SHARED_LIBS=True
38 make -C build VERBOSE=1
48 depends=('gcc-libs' 'glibc')
49 provides=(libbrotlicommon.so libbrotlidec.so libbrotlienc.so)
52 make -C build DESTDIR="$pkgdir" install
54 for man in docs/*.?; do
55 install -Dm 644 "$man" "$pkgdir/usr/share/man/man${man##*.}/${man##*/}"
57 install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
60 package_python-brotli() {
61 pkgdesc+=' - python library'
62 depends=('python' 'glibc' 'gcc-libs')
65 python setup.py install --skip-build -O1 --root="$pkgdir"
66 install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
69 package_brotli-testdata() {
70 pkgdesc+=' - test data'
74 install -dm755 "$pkgdir"/usr/share/brotli
75 cp -a tests/testdata "$pkgdir"/usr/share/brotli/
76 install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"