summarylogtreecommitdiffstats
path: root/0001-Fix-libs-install.patch
blob: e857077dffcfe8125bb5e8506049188929dee671 (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
--- a/src/Makefile
+++ b/src/Makefile
@@ -19,11 +19,12 @@
 LINK_FLAGS=-Wl,-z,defs
 LINK_FLAGS+=$(LDFLAGS)
 ENABLE_SHARED ?= 1
+DESTDIR ?= /usr
 
 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
@@ -85,20 +86,16 @@
 	$(QUIET_CC)$(CC) $(SO_CFLAGS) -shared -Wl,--version-script=liburing-ffi.map -Wl,-soname=$(ffi_soname) -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/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/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
 
 clean: