You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.5 KiB

  1. From a1f6cbb6c9a212b5b3b6605254ae35bead5c43df Mon Sep 17 00:00:00 2001
  2. From: Hank Leininger <hlein@korelogic.com>
  3. Date: Mon, 8 Oct 2018 18:17:30 -0600
  4. Subject: [PATCH 7/9] Symlink the shared library to pwd.
  5. DESTDIR is used, for instance, by distros to facilitate installing
  6. to a temp path for testing / package-building.
  7. In general nDPI supports DESTDIR (yay!), but using an absolute path
  8. for the target of the library link has two problems:
  9. 1) If DESTDIR is set to /some/tmp/path, we end up with a link that
  10. points to /some/tmp/path/usr/lib/libndpi-x.y.z, which is definitely
  11. not what is intended - once the package is installed, the link is
  12. broken.
  13. 2) Absolute links are problematic for distributions; pointing to
  14. /usr/lib/libndpi-x.y.z during package build-and-test would point to
  15. either a nonexistent file, or an old and possibly wrong one.
  16. Both of these are avoided if we just link to the target with no path
  17. at all.
  18. ---
  19. src/lib/Makefile.in | 2 +-
  20. 1 file changed, 1 insertion(+), 1 deletion(-)
  21. diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
  22. index cbbc54b..dc1e34b 100644
  23. --- a/src/lib/Makefile.in
  24. +++ b/src/lib/Makefile.in
  25. @@ -49,6 +49,6 @@ clean:
  26. install: $(NDPI_LIBS)
  27. mkdir -p $(DESTDIR)$(libdir)
  28. cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/
  29. - ln -Fs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
  30. + ln -Fs $(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
  31. mkdir -p $(DESTDIR)$(includedir)
  32. cp ../include/*.h $(DESTDIR)$(includedir)
  33. --
  34. 2.19.1