mirror of
https://github.com/termux-pacman/glibc-packages.git
synced 2025-02-24 06:15:04 +00:00
54 lines
1.6 KiB
Bash
54 lines
1.6 KiB
Bash
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
# Maintainer: 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=brotli-glibc
|
|
_gitcommit=e61745a6b7add50d380cfd7d3883dd6c62fc2c71
|
|
pkgver=1.0.9
|
|
pkgrel=0
|
|
pkgdesc='Generic-purpose lossless compression algorithm'
|
|
url='https://github.com/google/brotli'
|
|
arch=(any)
|
|
license=('MIT')
|
|
makedepends=('git' 'glibc' 'gcc-libs' 'cmake' 'python-setuptools')
|
|
source=(brotli::"git+${url}#commit=${_gitcommit}")
|
|
sha512sums=('SKIP')
|
|
|
|
prepare() {
|
|
cd brotli
|
|
git cherry-pick -n 09b0992b6acb7faa6fd3b23f9bc036ea117230fc # Fix broken Libs: in pc file
|
|
}
|
|
|
|
pkgver() {
|
|
cd brotli
|
|
git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
|
|
}
|
|
|
|
build() {
|
|
cd brotli
|
|
|
|
CFLAGS="-Wl,-rpath=/data/data/com.termux/files/usr/glibc/lib -Wl,--dynamic-linker=/data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1"
|
|
CXXFLAGS="${CFLAGS}"
|
|
|
|
python setup.py build
|
|
cmake -B build \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/data/data/com.termux/files/usr/glibc \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DBUILD_SHARED_LIBS=True
|
|
make -C build VERBOSE=1
|
|
}
|
|
|
|
package() {
|
|
cd brotli
|
|
make -C build DESTDIR="$pkgdir" install
|
|
local man;
|
|
for man in docs/*.?; do
|
|
install -Dm 644 "$man" "$pkgdir/data/data/com.termux/files/usr/glibc/share/man/man${man##*.}/${man##*/}"
|
|
done
|
|
install -Dm 644 LICENSE -t "$pkgdir/data/data/com.termux/files/usr/glibc/share/licenses/$pkgname"
|
|
}
|
|
|