diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ee0e63 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# OpenZL + +OpenZL delivers high compression ratios while preserving high speed, a level of performance that is out of reach for generic compressors. diff --git a/files/makefile.patch b/files/makefile.patch new file mode 100644 index 0000000..e9b2330 --- /dev/null +++ b/files/makefile.patch @@ -0,0 +1,32 @@ +diff --git a/Makefile b/Makefile +index b8ce4e2..5ca16ab 100644 +--- a/Makefile ++++ b/Makefile +@@ -47,6 +47,12 @@ EXEC_PREFIX ?= + # library + # ===================================== + ++LIB_MAJOR := 0 ++LIB_MINOR := 1 ++LIB_PATCH := 0 ++LIB_VERSION := $(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH) ++LIB_SONAME := libopenzl.so.$(LIB_MAJOR) ++ + LIBCSRCS := $(wildcard $(addsuffix /*.c, $(LIBDIRS))) + LIBASMSRCS := $(wildcard $(addsuffix /*.S, $(LIBDIRS))) + LIBOBJS := $(patsubst %.c,%.o,$(LIBCSRCS)) $(patsubst %.S,%.o,$(LIBASMSRCS)) +@@ -54,8 +60,12 @@ LIBOBJS := $(patsubst %.c,%.o,$(LIBCSRCS)) $(patsubst %.S,%.o,$(LIBASMSRCS)) + libopenzl.a: + $(eval $(call static_library,libopenzl.a,$(LIBOBJS),$(LIBZSTD_A))) + +-libopenzl.so: CFLAGS += -fPIC +-$(eval $(call c_dynamic_library,libopenzl.so,$(LIBOBJS),$(LIBZSTD_SO))) ++# Build the versioned shared library and set SONAME ++libopenzl.so.$(LIB_VERSION): CFLAGS += -fPIC ++libopenzl.so.$(LIB_VERSION): LDFLAGS += -Wl,-soname,$(LIB_SONAME) ++$(eval $(call c_dynamic_library,libopenzl.so.$(LIB_VERSION),$(LIBOBJS),$(LIBZSTD_SO))) ++ ++libopenzl.so: libopenzl.so.$(LIB_VERSION) + + .PHONY:lib + lib: libopenzl.a libopenzl.so diff --git a/files/openzl.pc b/files/openzl.pc new file mode 100644 index 0000000..e54ce52 --- /dev/null +++ b/files/openzl.pc @@ -0,0 +1,9 @@ +prefix=/usr +includedir=${prefix}/include +libdir=${prefix}/lib + +Name: openzl +Description: A novel data compression framework +Version: 0.1.0 +Libs: -L${libdir} -lopenzl +Cflags: -I${includedir} diff --git a/files/series b/files/series new file mode 100644 index 0000000..82374e5 --- /dev/null +++ b/files/series @@ -0,0 +1 @@ +makefile.patch diff --git a/package.yml b/package.yml new file mode 100644 index 0000000..4367331 --- /dev/null +++ b/package.yml @@ -0,0 +1,26 @@ +name : openzl +version : 0.1.0 +release : 1 +source : + - https://github.com/facebook/openzl/archive/refs/tags/v0.1.0.tar.gz : 3278546dcdbae3aef3887f07b435ebe0aa9f6943a5ac74cf9b7baeefe6526c2e +homepage : https://openzl.org/ +license : BSD-3-Clause +component : programming.library +summary : OpenZL delivers high compression ratios while preserving high speed, a level of performance that is out of reach for generic compressors. +description: | + OpenZL delivers high compression ratios while preserving high speed, a level of performance that is out of reach for generic compressors. +networking : yes +setup : | + %apply_patches + %cmake_ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DOPENZL_BUILD_TESTS=OFF +build : | + make zli lib +install : | + install -Dm755 zli "${installdir}/usr/bin/zli" + install -Dm755 libopenzl.so.0.1.0 "${installdir}/usr/lib/libopenzl.so.0.1.0" + ln -svf libopenzl.so.0.1.0 "${installdir}/usr/lib/libopenzl.so.0" + ln -svf libopenzl.so.0 "${installdir}/usr/lib/libopenzl.so" + cp -rv include "${installdir}/usr" + install -Dm644 $pkgfiles/openzl.pc -t $installdir/usr/lib/pkgconfig