diff options
author | Matt Jolly <kangie@gentoo.org> | 2024-06-01 17:20:54 +1000 |
---|---|---|
committer | Matt Jolly <kangie@gentoo.org> | 2024-06-01 17:21:53 +1000 |
commit | c3d1c029fab2ec382edeae05d0940e66406e6b0d (patch) | |
tree | e3b8994d5fe57e7d407517d5b7cea8f63a389dfc /generate-libvpx-test-tarball.sh | |
parent | add script to generate libaom test tarball (diff) | |
download | chromium-tools-c3d1c029fab2ec382edeae05d0940e66406e6b0d.tar.gz chromium-tools-c3d1c029fab2ec382edeae05d0940e66406e6b0d.tar.bz2 chromium-tools-c3d1c029fab2ec382edeae05d0940e66406e6b0d.zip |
add script to generate libvpx test tarball
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Diffstat (limited to 'generate-libvpx-test-tarball.sh')
-rwxr-xr-x | generate-libvpx-test-tarball.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/generate-libvpx-test-tarball.sh b/generate-libvpx-test-tarball.sh new file mode 100755 index 0000000..f8a3844 --- /dev/null +++ b/generate-libvpx-test-tarball.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# This script fetches the libvpx sources, checks out the appropriate tag +# and generates a tarball that can be placed in a devspace or other +# web-accessible site and added to SRC_URI for a given libvpx release. +# Legacy manual instructions: +# To create a new testdata tarball: +# 1. Unpack source tarball or checkout git tag +# 2. mkdir libvpx-testdata +# 3. export LIBVPX_TEST_DATA_PATH=libvpx-testdata +# 4. ./configure --enable-unit-tests --enable-vp9-highbitdepth +# 5. make testdata +# 6. tar -caf libvpx-testdata-${MY_PV}.tar.xz libvpx-testdata + +set -e + +if [ -d /tmp/libvpx ]; then + rm -rf /tmp/libvpx +fi + +git clone https://github.com/webmproject/libvpx.git /tmp/libvpx + +pushd /tmp/libvpx + # Assume we're getting the latest tag if not in env; + # we're typically only packaging the latest version. + LATEST_TAG="$(git tag --sort=taggerdate | tail -1)" + TAG="${1:-$LATEST_TAG}" + + if [ -d "/tmp/libvpx-${TAG:1}-testdata" ]; then + rm -rf "/tmp/libvpx-${TAG:1}-testdata" + fi + + mkdir -p "/tmp/libvpx-${TAG:1}-testdata" + + echo "Packaging libvpx testdata for ${TAG}" + git checkout "tags/${TAG}" + + ./configure --enable-unit-tests --enable-vp9-highbitdepth + LIBVPX_TEST_DATA_PATH="/tmp/libvpx-${TAG:1}-testdata" make -j$(nproc) testdata +popd +pushd /tmp + XZ_OPT="-T0 -9" tar cvaf "libvpx-${TAG:1}-testdata.tar.xz" "libvpx-${TAG:1}-testdata" +popd |