diff --git a/projects/github.com/jmacd/xdelta/package.yml b/projects/github.com/jmacd/xdelta/package.yml new file mode 100644 index 0000000000..9eb4a79954 --- /dev/null +++ b/projects/github.com/jmacd/xdelta/package.yml @@ -0,0 +1,48 @@ +# xdelta3 — open-source VCDIFF (RFC 3284) delta compression by Joshua MacDonald. +# +# The most widely used VCDIFF implementation outside Google's own +# open-vcdiff (which is archived as of 2023-08). xdelta is what +# Chromium auto-update uses for some delta channels, what many +# embedded firmware update pipelines run, and the canonical +# alternative reference for the format. +# +# Upstream is dormant since 2020 but the project is not archived; +# the algorithm and CLI surface are RFC-stable. C autotools build, +# GPL-2.0+. +# +# This packages the modern v3 line (`xdelta3/`). The older `xdelta1/` +# subdir is left out — that's the 1998 prototype, of historical +# interest only. + +distributable: + url: https://github.com/jmacd/xdelta/archive/refs/tags/{{version.tag}}.tar.gz + strip-components: 1 + +versions: + # Upstream publishes git tags but ZERO GitHub Releases. Use /tags. + github: jmacd/xdelta/tags + +build: + working-directory: xdelta3 + dependencies: + gnu.org/autoconf: "*" + gnu.org/automake: "*" + gnu.org/libtool: "*" + linux: + gnu.org/gcc: "*" + script: + - autoreconf -fi + - ./configure --prefix={{prefix}} + - make --jobs {{ hw.concurrency }} + - make install + +provides: + - bin/xdelta3 + +test: + # Round-trip: source → delta → reconstructed-target; verify identity. + - printf 'the quick brown fox jumps over the lazy dog\n' > source.txt + - printf 'the quick brown FOX jumps over the lazy DOG\n' > target.txt + - xdelta3 -e -s source.txt target.txt delta.vcdiff + - xdelta3 -d -s source.txt delta.vcdiff out.txt + - diff target.txt out.txt