%global forgeurl https://github.com/ckolivas/lrzip %global version %(date +%Y%m%d) %global commit cc698c919c644aa586e5dd74810afaff97696abc %global _forgeversionsuffix %{scm}%(printf %.7s %{commit}) %global source_date_epoch_from_changelog 0 %forgemeta %ifarch %{ix86} %bcond_without assembler %else %bcond_with assembler %endif # JIT in bundled libzpaq is supported on x86 and x86_64 only, bug #1309772 %ifarch %{ix86} x86_64 %bcond_without jit %else %bcond_with jit %endif # These utilities do not use the standalone library Name: lrzip Version: %{forgeversion} Release: %{autorelease} Summary: Compression program optimized for large files Group: Applications/File # libzpaq: MIT # lzma: Public Domain # md5.{c,h}: GPLv3+ # other files: GPLv2+ License: GPLv2+ and GPLv3+ and MIT and Public Domain URL: %{forgeurl} Source0: %{forgesource} BuildRequires: bash BuildRequires: bzip2-devel BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: glibc-common BuildRequires: lzo-devel BuildRequires: make %if %{with assembler} BuildRequires: nasm %endif BuildRequires: %{_bindir}/pod2man BuildRequires: zlib-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Bundled zpaq . lrzip does not work with # newer zpaq versions. Provides: bundled(zpaq) = 5.01 BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: pkgconfig(liblz4) %description Long Range ZIP or Lzma RZIP This is a compression program optimized for large files. The larger the file and the more memory you have, the better the compression advantage this will provide, especially once the files are larger than 100 MB. The advantage can be chosen to be either size (much smaller than bzip2) or speed (much faster than bzip2). Decompression is always much faster than bzip2. %prep %forgeautosetup ./autogen.sh for F in lzma/history.txt; do iconv -f ISO-8859-1 -t UTF-8 < "$F" > "${F}.utf8" touch -r "$F" "${F}.utf8" mv "${F}.utf8" "$F" done %global docdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} %build %configure \ --docdir='%{docdir}' --disable-doc \ --enable-shared --enable-static --disable-static-bin \ --%{?with_assembler:enable}%{!?with_assembler:disable}-asm \ --enable-largefile %{!?with_jit:CPPFLAGS="${CPPFLAGS} -DNOJIT"} make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT %check ./lrzip -z COPYING ./lrzip --info COPYING.lrz ./lrzip -d -o COPYING.new COPYING.lrz cmp COPYING COPYING.new rm COPYING.new %files %{docdir} %{_bindir}/* %{_mandir}/man1/*.1.gz %{_mandir}/man5/*.5.gz