summarylogtreecommitdiffstats
path: root/0001-Fix-libs-install.patch
blob: 9efe4fe162ab68bd41364e912af2a236d96db2e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- a/src/Makefile
+++ b/src/Makefile
@@ -19,9 +19,9 @@
 ENABLE_SHARED ?= 1
 
 soname=liburing.so.$(VERSION_MAJOR)
-libname=liburing.so.$(VERSION)
+libname=liburing.so
 ffi_soname=liburing-ffi.so.$(VERSION_MAJOR)
-ffi_libname=liburing-ffi.so.$(VERSION)
+ffi_libname=liburing-ffi.so
 
 all_targets += liburing.a
 all_targets += liburing-ffi.a
@@ -91,27 +91,23 @@
 	$(QUIET_RANLIB)$(RANLIB) liburing-ffi.a
 
 $(libname): $(liburing_sobjs) liburing.map
-	$(QUIET_CC)$(CC) $(SO_CFLAGS) -shared -Wl,--version-script=liburing.map -Wl,-soname=$(soname) -o $@ $(liburing_sobjs) $(LINK_FLAGS)
+	$(CC) $(SO_CFLAGS) -shared -o $@ $(liburing_sobjs) $(LINK_FLAGS)
 
 $(ffi_libname): $(liburing_ffi_objs) $(liburing_ffi_sobjs) $(liburing_sobjs) liburing-ffi.map
-	$(QUIET_CC)$(CC) $(SO_CFLAGS) -shared -Wl,--version-script=liburing-ffi.map -Wl,-soname=$(ffi_soname) -o $@ $(liburing_sobjs) $(liburing_ffi_sobjs) $(LINK_FLAGS)
+	$(CC) $(SO_CFLAGS) -shared -o $@ $(liburing_sobjs) $(liburing_ffi_sobjs) $(LINK_FLAGS)
 
 install: $(all_targets)
-	install -D -m 644 include/liburing/io_uring.h $(includedir)/liburing/io_uring.h
-	install -D -m 644 include/liburing.h $(includedir)/liburing.h
-	install -D -m 644 include/liburing/compat.h $(includedir)/liburing/compat.h
-	install -D -m 644 include/liburing/barrier.h $(includedir)/liburing/barrier.h
-	install -D -m 644 include/liburing/sanitize.h $(includedir)/liburing/sanitize.h
-	install -D -m 644 include/liburing/io_uring_version.h $(includedir)/liburing/io_uring_version.h
-	install -D -m 644 liburing.a $(libdevdir)/liburing.a
-	install -D -m 644 liburing-ffi.a $(libdevdir)/liburing-ffi.a
+	install -D -m 644 include/liburing/io_uring.h $(DESTDIR)$(includedir)/liburing/io_uring.h
+	install -D -m 644 include/liburing.h $(DESTDIR)$(includedir)/liburing.h
+	install -D -m 644 include/liburing/compat.h $(DESTDIR)$(includedir)/liburing/compat.h
+	install -D -m 644 include/liburing/barrier.h $(DESTDIR)$(includedir)/liburing/barrier.h
+	install -D -m 644 include/liburing/sanitize.h $(DESTDIR)$(includedir)/liburing/sanitize.h
+	install -D -m 644 include/liburing/io_uring_version.h $(DESTDIR)$(includedir)/liburing/io_uring_version.h
+	install -D -m 644 liburing.a $(DESTDIR)$(libdevdir)/liburing.a
+	install -D -m 644 liburing-ffi.a $(DESTDIR)$(libdevdir)/liburing-ffi.a
 ifeq ($(ENABLE_SHARED),1)
-	install -D -m 755 $(libname) $(libdir)/$(libname)
-	install -D -m 755 $(ffi_libname) $(libdir)/$(ffi_libname)
-	ln -sf $(libname) $(libdir)/$(soname)
-	ln -sf $(relativelibdir)$(libname) $(libdevdir)/liburing.so
-	ln -sf $(ffi_libname) $(libdir)/$(ffi_soname)
-	ln -sf $(relativelibdir)$(ffi_libname) $(libdevdir)/liburing-ffi.so
+	install -D -m 755 $(libname) $(DESTDIR)$(libdir)/$(libname)
+	install -D -m 755 $(ffi_libname) $(DESTDIR)$(libdir)/$(ffi_libname)
 endif
 
 uninstall: