2022-03-07 10:50:48 +01:00
|
|
|
# Contributor: Felix Yan <felixonmars@archlinux.org>
|
|
|
|
# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
|
|
|
# Contributor: Lex Black <autumn-wind at web dot de>
|
|
|
|
# Contributor: TingPing <tingping@tingping.se>
|
|
|
|
# Contributor: Guillaume Horel <guillaume.horel@gmail.com>
|
|
|
|
|
|
|
|
pkgname=static-compat-brotli
|
2023-12-31 18:46:58 +01:00
|
|
|
_gitcommit=ed738e842d2fbdf2d6459e39267a633c4a9b2f5d
|
|
|
|
pkgver=1.1.0
|
2024-01-02 18:46:39 +01:00
|
|
|
pkgrel=2
|
2022-03-07 10:50:48 +01:00
|
|
|
pkgdesc='Generic-purpose lossless compression algorithm'
|
|
|
|
url='https://github.com/google/brotli'
|
|
|
|
arch=('x86_64')
|
|
|
|
license=('MIT')
|
|
|
|
depends=('gcc-libs-static-compat')
|
|
|
|
makedepends=('static-compat-cmake' 'git')
|
|
|
|
options=('staticlibs')
|
|
|
|
source=(${pkgname}::"git+${url}#commit=${_gitcommit}")
|
|
|
|
sha512sums=('SKIP')
|
|
|
|
|
|
|
|
pkgver() {
|
|
|
|
cd ${pkgbase}
|
|
|
|
git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
source static-compat-environment
|
|
|
|
cd ${pkgbase}
|
|
|
|
static-compat-cmake -B build \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
2023-12-31 18:46:58 +01:00
|
|
|
cmake --build build -v
|
2022-03-07 10:50:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
source static-compat-environment
|
|
|
|
cd ${pkgbase}
|
2023-12-31 18:46:58 +01:00
|
|
|
cd build
|
|
|
|
ctest --output-on-failure --stop-on-failure -j$(nproc)
|
2022-03-07 10:50:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
source static-compat-environment
|
|
|
|
cd ${pkgbase}
|
2023-12-31 18:46:58 +01:00
|
|
|
DESTDIR="$pkgdir" cmake --install build
|
2022-03-07 10:50:48 +01:00
|
|
|
find "$pkgdir/$static_compat_prefix" -iname '*.so*' -delete
|
|
|
|
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
|
|
|
|
}
|