brotli/PKGBUILD

55 lines
1.5 KiB
Bash
Raw Permalink Normal View History

2024-05-09 11:41:55 +08:00
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
2024-10-30 00:32:48 +08:00
pkgname=(brotli python-brotli)
pkgbase=brotli
2024-05-09 11:41:55 +08:00
pkgver=1.1.0
2024-10-30 00:32:48 +08:00
pkgrel=3
2024-05-09 11:41:55 +08:00
pkgdesc="Generic-purpose lossless compression algorithm"
arch=('x86_64')
url="https://github.com/google/brotli"
license=('MIT')
2024-05-09 11:43:51 +08:00
makedepends=('cmake' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
2024-10-30 00:32:48 +08:00
source=(https://github.com/google/brotli/archive/v${pkgver}/${pkgbase}-${pkgver}.tar.gz)
2024-05-09 11:41:55 +08:00
sha256sums=(e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff)
build() {
2024-10-30 00:32:48 +08:00
cd ${pkgbase}-${pkgver}
2024-05-09 11:41:55 +08:00
2024-10-30 00:32:48 +08:00
python3 -m build --wheel --no-isolation
2024-05-09 11:43:51 +08:00
2024-10-30 00:32:48 +08:00
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib64 \
-DCMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects" \
-Bbuild
2024-05-09 11:41:55 +08:00
2024-10-30 00:32:48 +08:00
cmake --build build -v
2024-05-09 11:41:55 +08:00
}
2024-10-30 00:32:48 +08:00
package_brotli() {
depends=('glibc')
cd ${pkgbase}-${pkgver}
2024-05-09 11:43:51 +08:00
2024-10-30 00:32:48 +08:00
DESTDIR=${pkgdir} cmake --install build
local man
for man in docs/*.?; do
install -Dm 644 ${man} ${pkgdir}/usr/share/man/man${man##*.}/${man##*/}
done
}
package_python-brotli() {
pkgdesc+=" - python library"
depends=('python')
cd ${pkgbase}-${pkgver}
python3 -m installer --destdir=${pkgdir} dist/*.whl
2024-05-09 11:41:55 +08:00
}