diff --git a/zchunk-1.2.1.tar.gz b/zchunk-1.2.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d0c92fea19e846277956881254ce378dc0f44670 Binary files /dev/null and b/zchunk-1.2.1.tar.gz differ diff --git a/zchunk.spec b/zchunk.spec new file mode 100644 index 0000000000000000000000000000000000000000..3c876698be8e310ff42909f6022737235c96ad5b --- /dev/null +++ b/zchunk.spec @@ -0,0 +1,89 @@ +%define anolis_release 1 +Name: zchunk +Version: 1.2.1 +Release: %{anolis_release}%{?dist} +Summary: Compressed file format that allows easy deltas +License: BSD and MIT +URL: https://github.com/zchunk/zchunk +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +BuildRequires: gcc +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(openssl) +BuildRequires: meson +Requires: %{name}-libs = %{version}-%{release} +Provides: bundled(buzhash-urlblock) = 0.1 + +%description +zchunk is a compressed file format that splits the file into independent +chunks. This allows you to only download the differences when downloading a +new version of the file, and also makes zchunk files efficient over rsync. +zchunk files are protected with strong checksums to verify that the file you +downloaded is in fact the file you wanted. + +%package libs +Summary: Zchunk library + +%description libs +zchunk is a compressed file format that splits the file into independent +chunks. This allows you to only download the differences when downloading a +new version of the file, and also makes zchunk files efficient over rsync. +zchunk files are protected with strong checksums to verify that the file you +downloaded is in fact the file you wanted. + +This package contains the zchunk library, libzck. + +%package devel +Summary: Headers for building against zchunk +Requires: %{name}-libs = %{version}-%{release} + +%description devel +zchunk is a compressed file format that splits the file into independent +chunks. This allows you to only download the differences when downloading a +new version of the file, and also makes zchunk files efficient over rsync. +zchunk files are protected with strong checksums to verify that the file you +downloaded is in fact the file you wanted. + +This package contains the headers necessary for building against the zchunk +library, libzck. + +%prep +%autosetup +# Remove bundled sha libraries +rm -rf src/lib/hash/sha* + +%build +%meson -Dwith-openssl=enabled -Dwith-zstd=enabled +%meson_build + +%install +%meson_install +mkdir -p %{buildroot}%{_libexecdir} +install contrib/gen_xml_dictionary %{buildroot}%{_libexecdir}/zck_gen_xml_dictionary + +%check +%meson_test + +%ldconfig_scriptlets libs + +%files +%doc README.md contrib +%{_bindir}/zck* +%{_bindir}/unzck +%{_libexecdir}/zck_gen_xml_dictionary +%{_mandir}/man1/*.gz + +%files libs +%license LICENSE +%doc README.md +%{_libdir}/libzck.so.* + +%files devel +%doc zchunk_format.txt +%{_libdir}/libzck.so +%{_libdir}/pkgconfig/zck.pc +%{_includedir}/zck.h + +%changelog +* Mon Apr 18 2022 Chunmei Xu - 1.2.1-1 +- init from upstream