Initial import (#1373218).

This commit is contained in:
Pádraig Brady 2016-10-03 15:17:14 +01:00
parent 4dd49b35be
commit ccc3322b44
4 changed files with 112 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/zstd-1.1.0.tar.gz

View File

@ -0,0 +1 @@
64fc5efcd1ca60a3cd74a3ccaf25006e zstd-1.1.0.tar.gz

26
zstd-lib-no-rebuild.patch Normal file
View File

@ -0,0 +1,26 @@
Proposed upstream at https://github.com/pixelb/zstd/pull/1
diff -Naur zstd-1.0.0/lib/Makefile zstd-1.0.0.fedora/lib/Makefile
--- zstd-1.0.0/lib/Makefile 2016-08-31 16:09:10.000000000 +0000
+++ zstd-1.0.0.fedora/lib/Makefile 2016-09-05 11:45:59.449374900 +0000
@@ -57,9 +57,9 @@
.PHONY: default all clean install uninstall
-default: clean libzstd
+default: libzstd
-all: clean libzstd
+all: libzstd
libzstd: $(ZSTD_FILES)
@echo compiling static library
@@ -89,7 +89,7 @@
-e 's|@VERSION@|$(VERSION)|' \
$< >$@
-install: libzstd libzstd.pc
+install: libzstd.pc
@install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
@install -m 755 libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER)
@cp -a libzstd.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)

84
zstd.spec Normal file
View File

@ -0,0 +1,84 @@
Name: zstd
Version: 1.1.0
Release: 1%{?dist}
Summary: Zstd compression library
License: BSD and MIT
URL: https://github.com/facebook/zstd
Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# Proposed upstream at https://github.com/pixelb/zstd/pull/1
Patch0: zstd-lib-no-rebuild.patch
BuildRequires: gcc
%description
Zstd, short for Zstandard, is a fast lossless compression algorithm,
targeting real-time compression scenarios at zlib-level compression ratio.
%package -n lib%{name}
Summary: Zstd shared library
%description -n lib%{name}
Zstandard compression shared library.
%package -n lib%{name}-devel
Summary: Header files for Zstd library
Requires: lib%{name}%{?_isa} = %{version}-%{release}
%description -n lib%{name}-devel
Header files for Zstd library.
%prep
%setup -q
find -name .gitignore -delete
%patch0 -p1
%build
for dir in lib programs; do
CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" %make_build -C "$dir"
done
%check
CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" make -C tests test-zstd
%install
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
rm %{buildroot}/%{_libdir}/libzstd.a
%files
%doc NEWS README.md
%{_bindir}/%{name}
%{_bindir}/un%{name}
%{_bindir}/%{name}cat
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/un%{name}.1*
%{_mandir}/man1/%{name}cat.1*
%license LICENSE PATENTS
%files -n lib%{name}
%{_libdir}/libzstd.so.*
%license LICENSE PATENTS
%files -n lib%{name}-devel
%{_includedir}/zbuff.h
%{_includedir}/zdict.h
%{_includedir}/zstd.h
%{_libdir}/pkgconfig/libzstd.pc
%{_libdir}/libzstd.so
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%changelog
* Thu Sep 29 2016 Pádraig Brady <pbrady@fb.com> 1.1.0-1
- New upstream release
- Remove examples and static lib
* Mon Sep 12 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-2
- Adjust various upstream links
- Parameterize various items in spec file
* Mon Sep 5 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-1
- Initial release