Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] testing/brotli: new aport

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Tue, 21 Jun 2016 23:33:04 +0200

Sorry for late response.

On Wed, 10 Feb 2016 18:05:44 +0200
Valery Kartel <valery.kartel_at_gmail.com> wrote:

> A generic-purpose lossless compression algorithm
> https://github.com/google/brotli
>
> Also I include 'libbrotli' git repo to build shared libraries around the brotli sources.
> https://github.com/bagder/libbrotli

Why not ship those in separate apkbuild? It looks like 2 separate
projects which likely will have separate release cycles.

-nc

> ---
> testing/brotli/APKBUILD | 91 ++++++++++++++++++++++++++++++++++++++++
> testing/brotli/makefile-am.patch | 22 ++++++++++
> 2 files changed, 113 insertions(+)
> create mode 100644 testing/brotli/APKBUILD
> create mode 100644 testing/brotli/makefile-am.patch
>
> diff --git a/testing/brotli/APKBUILD b/testing/brotli/APKBUILD
> new file mode 100644
> index 0000000..b9fa06a
> --- /dev/null
> +++ b/testing/brotli/APKBUILD
> _at_@ -0,0 +1,91 @@
> +# Maintainer: Valery Kartel <valery.kartel_at_gmail.com>
> +# Contributor: Valery Kartel <valery.kartel_at_gmail.com>
> +pkgname="brotli"
> +pkgver="0.3.0"
> +pkgrel=0
> +pkgdesc="A generic-purpose lossless compression algorithm"
> +url="https://github.com/google/brotli"
> +
> +_gitpkg=libbrotli
> +_gitver=1.0.0
> +_giturl="https://github.com/bagder/libbrotli.git"
> +
> +arch="all"
> +license="MIT"
> +depends=
> +makedepends="autoconf automake libtool python-dev"
> +install=
> +subpackages="$_gitpkg:libs $_gitpkg-dev:dev $pkgname-python:py"
> +source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/v$pkgver.tar.gz
> + http://dev.alpinelinux.org/archive/$_gitpkg/$_gitpkg-$_gitver.tar.gz
> + makefile-am.patch
> + "
> +
> +snapshot() {
> + local _pkg=$_gitpkg-$_gitver
> + mkdir -p "$srcdir"
> + cd "$srcdir"
> + msg "Creating snapshot..."
> + rm -rf ${_giturl##*/}
> + git clone --depth=1 --bare $_giturl || return 1
> + git --git-dir ${_giturl##*/} archive -o $_pkg.tar.gz \
> + --prefix=$_pkg/ HEAD || return 1
> + msg "Uploading..."
> + rsync -Lave ssh $_pkg.tar.gz dev.alpinelinux.org:/archive/$_gitpkg/
> + msg "Done."
> +}
> +
> +_builddir="$srcdir"/$_gitpkg-$_gitver
> +prepare() {
> + cd "$_builddir"
> + rm -fr $pkgname
> + ln -sf ../$pkgname-$pkgver $pkgname
> + for i in $source; do
> + case $i in
> + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
> + esac
> + done
> + ./autogen.sh
> +}
> +
> +build() {
> + cd "$_builddir"/$pkgname
> + python ./setup.py build_ext || return 1
> + cd tools && make || return 1
> + cd "$_builddir"
> + ./configure --prefix=/usr || return 1
> + make || return 1
> +}
> +
> +package() {
> + cd "$_builddir"
> + make DESTDIR="$pkgdir" install
> + install -Dm755 $pkgname/tools/bro "$pkgdir"/usr/bin/bro
> +}
> +
> +
> +libs() {
> + pkgver=$_gitver
> + default_libs
> +}
> +
> +dev() {
> + pkgver=$_gitver
> + default_dev
> +}
> +
> +py() {
> + pkgdesc="Python bindings for the $pkgname"
> + cd "$_builddir"/$pkgname
> + python ./setup.py install --skip-build --root="$subpkgdir" || return 1
> +}
> +
> +md5sums="46e13b32e15903932802017724fda448 brotli-0.3.0.tar.gz
> +a60c3b2438a094e8b9504b375a19105b libbrotli-1.0.0.tar.gz
> +94257f3b8749addcbbb3ff0b3b4d455e makefile-am.patch"
> +sha256sums="5d49eb1a6dd19304dd683c293abf66c8a419728f4c6d0f390fa7deb2a39eaae2 brotli-0.3.0.tar.gz
> +46ce219ec013c69057c3c08bdc0f35e4e91d87e5ab9e628d4ca4099811ad4c84 libbrotli-1.0.0.tar.gz
> +6d1e126c2835fe5c4fecc29dddbc2928752c2fd664b7722dd3459dea309d315d makefile-am.patch"
> +sha512sums="7a5aab18764c871e78aa23737e894cb879456c5a21717f9b778756d41101127c9c71a51824d12b8bac7b469fd4d5099bd17a332d3d17c7c7d588d48c2ad999db brotli-0.3.0.tar.gz
> +b200b47b6f86f38444e14aefba4d21cd321905e82899a3a49152c7b3d03d0f7c4ada82b9affeda5f8538f043ce70be4a03070e1c3ac914f3f1b51a18977dfc01 libbrotli-1.0.0.tar.gz
> +cbbdd54e11c956e188c4b8098acab7ae715cdf560395a67704d2982a6437034227ee7c18f758c30a0acfa873f90f210c89f44db5e1400a8c354fc24dbaaa65aa makefile-am.patch"
> diff --git a/testing/brotli/makefile-am.patch b/testing/brotli/makefile-am.patch
> new file mode 100644
> index 0000000..b1caa52
> --- /dev/null
> +++ b/testing/brotli/makefile-am.patch
> _at_@ -0,0 +1,22 @@
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +_at_@ -14,8 +14,7 @@
> + brotli/enc/encode.cc brotli/enc/static_dict.cc \
> + brotli/enc/encode_parallel.cc brotli/enc/streams.cc \
> + brotli/enc/entropy_encode.cc brotli/enc/dictionary.cc \
> +- brotli/enc/utf8_util.cc brotli/enc/compress_fragment.cc \
> +- brotli/enc/compress_fragment_two_pass.cc
> ++ brotli/enc/utf8_util.cc
> +
> + DECODEHEADERS = brotli/dec/decode.h brotli/dec/state.h \
> + brotli/dec/streams.h brotli/dec/types.h brotli/dec/bit_reader.h \
> +_at_@ -32,8 +31,7 @@
> + brotli/enc/literal_cost.h brotli/enc/cluster.h brotli/enc/bit_cost.h \
> + brotli/enc/entropy_encode.h brotli/enc/brotli_bit_stream.h \
> + brotli/enc/write_bits.h brotli/enc/static_dict_lut.h \
> +- brotli/enc/encode_parallel.h brotli/enc/types.h brotli/enc/utf8_util.h \
> +- brotli/enc/compress_fragment.h brotli/enc/compress_fragment_two_pass.h
> ++ brotli/enc/encode_parallel.h brotli/enc/types.h brotli/enc/utf8_util.h
> +
> + EXTRA_DIST = AUTHORS README
> +



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Jun 21 2016 - 23:33:04 GMT