[packages/zstd] - new
qboosh
qboosh at pld-linux.org
Sat Apr 9 18:45:12 CEST 2016
commit 8edbfa0e41e80cd9f7c626c1c31ae9fa63b610f2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Apr 9 18:45:01 2016 +0200
- new
zstd-no32.patch | 11 ++++++
zstd-noclean.patch | 23 ++++++++++++
zstd-noquiet.patch | 77 +++++++++++++++++++++++++++++++++++++++++
zstd.spec | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 211 insertions(+)
---
diff --git a/zstd.spec b/zstd.spec
new file mode 100644
index 0000000..b7e81f3
--- /dev/null
+++ b/zstd.spec
@@ -0,0 +1,100 @@
+Summary: Zstandard - fast lossless compression algorithm
+Summary(pl.UTF-8): Zstandard - szybki, bezstratny algorytm kompresji
+Name: zstd
+Version: 0.5.1
+Release: 1
+License: BSD
+Group: Libraries
+#Source0Download: https://github.com/Cyan4973/zstd/releases
+Source0: https://github.com/Cyan4973/zstd/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 0f972162c5ec73d04bb2243d520d18f0
+Patch0: %{name}-noquiet.patch
+Patch1: %{name}-no32.patch
+Patch2: %{name}-noclean.patch
+URL: https://github.com/Cyan4973/zstd
+BuildRequires: gcc >= 5:3.2
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Zstd, short for Zstandard, is a fast lossless compression algorithm,
+targeting real-time compression scenarios at zlib-level compression
+ratio.
+
+%description -l pl.UTF-8
+Zstd (skrót od Zstandard) to szybki, bezstratny algorytm kompresji, do
+zastosowwań przy kompresji w czasie rzeczywistym ze współczynnikiem
+kompresji zbliżonym do biblioteki zlib.
+
+%package devel
+Summary: Header files for Zstd library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Zstd
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for Zstd library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Zstd.
+
+%package static
+Summary: Static Zstd library
+Summary(pl.UTF-8): Statyczna biblioteka Zstd
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static Zstd library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka Zstd.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+LDFLAGS="%{rpmldflags}" \
+%{__make} all
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT \
+ PREFIX=%{_prefix} \
+ LIBDIR=%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc NEWS README.md images
+%attr(755,root,root) %{_bindir}/unzstd
+%attr(755,root,root) %{_bindir}/zstd
+%attr(755,root,root) %{_bindir}/zstdcat
+%attr(755,root,root) %{_libdir}/libzstd.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libzstd.so.0
+%{_mandir}/man1/unzstd.1*
+%{_mandir}/man1/zstd.1*
+%{_mandir}/man1/zstdcat.1*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libzstd.so
+%{_includedir}/zbuff.h
+%{_includedir}/zdict.h
+%{_includedir}/zstd.h
+%{_pkgconfigdir}/libzstd.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libzstd.a
diff --git a/zstd-no32.patch b/zstd-no32.patch
new file mode 100644
index 0000000..0d533fe
--- /dev/null
+++ b/zstd-no32.patch
@@ -0,0 +1,11 @@
+--- zstd-0.5.1/programs/Makefile.orig 2016-02-18 12:04:02.000000000 +0100
++++ zstd-0.5.1/programs/Makefile 2016-04-09 17:53:32.607921888 +0200
+@@ -82,7 +82,7 @@
+
+ default: zstd
+
+-all: zstd zstd32 fullbench fullbench32 fuzzer fuzzer32 zbufftest zbufftest32 paramgrill datagen
++all: zstd fullbench fuzzer zbufftest paramgrill datagen
+
+ zstd : $(ZSTD_FILES) $(ZSTD_FILES_LEGACY) $(ZSTDDIR)/zbuff.c $(ZSTDDIR)/zdict.c $(ZSTDDIR)/divsufsort.c \
+ zstdcli.c fileio.c bench.c xxhash.c datagen.c dibio.c
diff --git a/zstd-noclean.patch b/zstd-noclean.patch
new file mode 100644
index 0000000..ce83551
--- /dev/null
+++ b/zstd-noclean.patch
@@ -0,0 +1,23 @@
+--- zstd-0.5.1/lib/Makefile.orig 2016-04-09 17:48:36.367934319 +0200
++++ zstd-0.5.1/lib/Makefile 2016-04-09 17:56:18.837914911 +0200
+@@ -79,9 +79,9 @@
+
+ .PHONY: default all clean install uninstall
+
+-default: clean libzstd
++default: libzstd
+
+-all: clean libzstd
++all: libzstd
+
+ libzstd: $(ZSTD_FILES)
+ @echo compiling static library
+@@ -110,7 +110,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)
diff --git a/zstd-noquiet.patch b/zstd-noquiet.patch
new file mode 100644
index 0000000..31669b5
--- /dev/null
+++ b/zstd-noquiet.patch
@@ -0,0 +1,77 @@
+--- zstd-0.5.1/lib/Makefile.orig 2016-02-18 12:04:02.000000000 +0100
++++ zstd-0.5.1/lib/Makefile 2016-04-09 17:32:37.197974571 +0200
+@@ -85,16 +85,16 @@
+
+ libzstd: $(ZSTD_FILES)
+ @echo compiling static library
+- @$(CC) $(FLAGS) -c $^
+- @$(AR) rcs $@.a *.o
++ $(CC) $(FLAGS) -c $^
++ $(AR) rcs $@.a *.o
+ @echo compiling dynamic library $(LIBVER)
+- @$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER)
++ $(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER)
+ @echo creating versioned links
+- @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR)
+- @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT)
++ ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR)
++ ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT)
+
+ clean:
+- @rm -f core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc
++ rm -f core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc
+ @echo Cleaning library completed
+
+ #------------------------------------------------------------------------
+@@ -104,33 +104,33 @@
+ libzstd.pc:
+ libzstd.pc: libzstd.pc.in
+ @echo creating pkgconfig
+- @sed -e 's|@PREFIX@|$(PREFIX)|' \
++ sed -e 's|@PREFIX@|$(PREFIX)|' \
+ -e 's|@LIBDIR@|$(LIBDIR)|' \
+ -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \
+ -e 's|@VERSION@|$(VERSION)|' \
+ $< >$@
+
+ install: libzstd 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)
+- @cp -a libzstd.$(SHARED_EXT) $(DESTDIR)$(LIBDIR)
+- @cp -a libzstd.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
+- @install -m 644 libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a
+- @install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h
+- @install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h
+- @install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zdict.h
++ 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)
++ cp -a libzstd.$(SHARED_EXT) $(DESTDIR)$(LIBDIR)
++ cp -a libzstd.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
++ install -m 644 libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a
++ install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h
++ install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h
++ install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zdict.h
+ @echo zstd static and shared library installed
+
+ uninstall:
+- @rm -f $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT)
+- @rm -f $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR)
+- @rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/libzstd.pc
+- @[ -x $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER) ] && rm -f $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER)
+- @[ -f $(DESTDIR)$(LIBDIR)/libzstd.a ] && rm -f $(DESTDIR)$(LIBDIR)/libzstd.a
+- @[ -f $(DESTDIR)$(INCLUDEDIR)/zstd.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/zstd.h
+- @[ -f $(DESTDIR)$(INCLUDEDIR)/zstd.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/zbuff.h
+- @[ -f $(DESTDIR)$(INCLUDEDIR)/zstd.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/zdict.h
++ rm -f $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT)
++ rm -f $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR)
++ rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/libzstd.pc
++ [ -x $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER) ] && rm -f $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER)
++ [ -f $(DESTDIR)$(LIBDIR)/libzstd.a ] && rm -f $(DESTDIR)$(LIBDIR)/libzstd.a
++ [ -f $(DESTDIR)$(INCLUDEDIR)/zstd.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/zstd.h
++ [ -f $(DESTDIR)$(INCLUDEDIR)/zstd.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/zbuff.h
++ [ -f $(DESTDIR)$(INCLUDEDIR)/zstd.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/zdict.h
+ @echo zstd libraries successfully uninstalled
+
+ endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/zstd.git/commitdiff/8edbfa0e41e80cd9f7c626c1c31ae9fa63b610f2
More information about the pld-cvs-commit
mailing list