0.1.0
All checks were successful
Build / Build project (push) Successful in 47s

This commit is contained in:
Alexander Zhirov 2025-10-09 19:12:27 +03:00
parent a7ffa41ee8
commit a82a77ade4
Signed by: alexander
GPG key ID: C8D8BE544A27C511
5 changed files with 71 additions and 0 deletions

32
files/makefile.patch Normal file
View file

@ -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

9
files/openzl.pc Normal file
View file

@ -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}

1
files/series Normal file
View file

@ -0,0 +1 @@
makefile.patch