Skip to content

Commit

Permalink
user-install: Use of the R2PM_MANDIR instead of sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
teasp00n authored Feb 18, 2025
1 parent 615cb05 commit 77bac0c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ LDFLAGS+=$(shell pkg-config --libs r_core r_io r_util)
endif
R2_BINDIR=$(shell r2 -H R2_PREFIX)/bin
R2PM_BINDIR=$(shell r2pm -H R2PM_BINDIR)
R2PM_MANDIR=$(shell r2pm -H R2PM_MANDIR)
ifeq ($(R2PM_MANDIR),)
R2PM_MANDIR := "$(R2PM_BINDIR)/../man"
$(warning "r2pm does not export a directory for manpages. Using $(R2PM_MANDIR).")
endif
R2_PLUGDIR=$(shell r2 -H R2_USER_PLUGINS)
R2_PLUGSYS=$(shell r2 -H R2_LIBR_PLUGINS)
ifeq ($(R2_PLUGDIR),)
Expand Down Expand Up @@ -331,8 +336,8 @@ user-install:
$(RM) "$(DESTDIR)/$(R2_PLUGDIR)/io_frida.$(SO_EXT)"
cp -f io_frida.$(SO_EXT)* $(DESTDIR)/"$(R2_PLUGDIR)"
cp -f src/r2frida-compile $(DESTDIR)/"$(R2PM_BINDIR)"
-sudo mkdir -p "$(DESTDIR)/$(PREFIX)/share/man/man1"
-sudo cp -f r2frida.1 "$(DESTDIR)/$(PREFIX)/share/man/man1/r2frida.1"
-mkdir -p "$(DESTDIR)/$(R2PM_MANDIR)/man1"
-cp -f r2frida.1 "$(DESTDIR)/$(R2PM_MANDIR)/man1/r2frida.1"

user-uninstall:
$(RM) "$(DESTDIR)/$(R2_PLUGDIR)/io_frida.$(SO_EXT)"
Expand Down

0 comments on commit 77bac0c

Please sign in to comment.