pkgname=(brotli python-brotli) pkgbase=brotli pkgver=1.1.0 pkgrel=1 pkgdesc="Generic-purpose lossless compression algorithm" arch=('x86_64') url="https://github.com/google/brotli" license=('MIT') makedepends=('cmake' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel') source=(https://github.com/google/brotli/archive/v${pkgver}/${pkgbase}-${pkgver}.tar.gz) sha256sums=(e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff) build() { cd ${pkgbase}-${pkgver} python3 -m build --wheel --no-isolation local cmake_args=( -B flarebird-build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib64 -DCMAKE_C_FLAGS="${CFLAGS} -ffat-lto-objects" ) cmake ${cmake_args[@]} cmake --build flarebird-build -v } package_brotli() { depends=('glibc') cd ${pkgbase}-${pkgver} DESTDIR=${pkgdir} cmake --install flarebird-build } package_python-brotli() { pkgdesc+=" - python library" depends=('python') cd ${pkgbase}-${pkgver} python3 -m installer --destdir=${pkgdir} dist/*.whl }