Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions projects/librsync.github.io/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
distributable:
url: https://github.com/librsync/librsync/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1

# Library that implements the rsync remote-delta algorithm (signature / delta /
# patch). Ships the `rdiff` CLI used as the reference for librsync interop.

versions:
github: librsync/librsync/tags
strip:
- /^v/

dependencies:
rpm.org/popt: ^1

build:
dependencies:
cmake.org: ^3
ninja-build.org: ^1
script:
- cmake -S . -B build $ARGS
- cmake --build build --parallel {{ hw.concurrency }}
- cmake --install build
env:
ARGS:
- -GNinja
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX={{prefix}}
- -DBUILD_RDIFF=ON
- -DENABLE_TESTS=OFF

provides:
- bin/rdiff

test:
env:
RDIFF: "{{prefix}}/bin/rdiff"
script:
- $RDIFF -V | grep -F {{version}}
# round-trip: signature -> delta -> patch
- head -c 65536 /dev/urandom > basis.bin
- cp basis.bin new.bin
- printf 'edit' >> new.bin
- $RDIFF signature basis.bin basis.sig
- $RDIFF delta basis.sig new.bin new.delta
- $RDIFF patch basis.bin new.delta out.bin
- cmp new.bin out.bin
Loading