summaryrefslogtreecommitdiffstats
path: root/debian/patches/declare-soname.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/declare-soname.patch')
-rw-r--r--debian/patches/declare-soname.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/declare-soname.patch b/debian/patches/declare-soname.patch
new file mode 100644
index 0000000..1221d54
--- /dev/null
+++ b/debian/patches/declare-soname.patch
@@ -0,0 +1,34 @@
+Description: declare SONAME
+Author: Yadd <yadd@debian.org>
+Forwarded: not-needed
+Last-Update: 2024-01-18
+
+--- a/llhttp/Makefile
++++ b/llhttp/Makefile
+@@ -1,6 +1,7 @@
+ CLANG ?= clang
+ CFLAGS ?=
+ OS ?=
++SONAME ?=
+
+ CFLAGS += -Os -g3 -Wall -Wextra -Wno-unused-parameter
+ ifneq ($(OS),Windows_NT)
+@@ -23,7 +24,7 @@
+
+ build/libllhttp.so: build/c/llhttp.o build/native/api.o \
+ build/native/http.o
+- $(CLANG) -shared $^ -o $@
++ $(CLANG) -shared $^ -Wl,-soname,$(SONAME) -o $@
+
+ build/libllhttp.a: build/c/llhttp.o build/native/api.o \
+ build/native/http.o
+@@ -88,6 +89,8 @@
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -C build/llhttp.h $(DESTDIR)$(INCLUDEDIR)/llhttp.h
+ $(INSTALL) -C build/libllhttp.a $(DESTDIR)$(LIBDIR)/libllhttp.a
+- $(INSTALL) build/libllhttp.so $(DESTDIR)$(LIBDIR)/libllhttp.so
++ $(INSTALL) build/libllhttp.so $(DESTDIR)$(LIBDIR)/$(SONAME)
++ ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAMEALIAS)
++ ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/libllhttp.so
+
+ .PHONY: all generate clean release postversion github-release