opt/brotli/Pkgfile

30 lines
832 B
Plaintext
Raw Normal View History

2018-04-02 07:06:55 +02:00
# Description: Brotli compression library
# URL: https://github.com/google/brotli
2023-08-27 17:50:25 +02:00
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on:
2018-04-02 07:06:55 +02:00
name=brotli
2020-08-31 11:38:18 +02:00
version=1.0.9
release=2
source=(https://github.com/google/$name/archive/v$version/$name-v$version.tar.gz
2023-08-27 17:50:25 +02:00
runtime-linker-path.patch)
2018-04-02 07:06:55 +02:00
build() {
2023-08-27 17:50:25 +02:00
# https://github.com/google/brotli/commit/09b0992b6acb7faa6fd3b23f9bc036ea117230fc
patch -d $name-$version -p1 -i $SRC/runtime-linker-path.patch
2023-08-27 17:50:25 +02:00
cmake -S $name-$version -B build -G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D BUILD_SHARED_LIBS=True
2018-04-02 07:06:55 +02:00
2023-08-27 17:50:25 +02:00
cmake --build build
DESTDIR=$PKG cmake --install build
2023-08-27 17:50:25 +02:00
cd $name-$version
/usr/bin/python3 setup.py build
/usr/bin/python3 setup.py install \
--prefix=/usr --root=$PKG --optimize=1
2018-04-02 07:06:55 +02:00
}