# 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 pkgname=(brotli python-brotli) pkgbase=brotli pkgver=1.1.0 pkgrel=3 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 cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib64 \ -DCMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects" \ -Bbuild cmake --build build -v } package_brotli() { depends=('glibc') cd ${pkgbase}-${pkgver} 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 }