Skip to content

Commit

Permalink
Install the r2yara manpage
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Apr 15, 2024
1 parent 76123ce commit 94d0261
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.mk.acr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DESTDIR=
PREFIX=@PREFIX@
HOST_OS=@HOST_OS@
LIBDIR=@LIBDIR@
MANDIR=@MANDIR@
INSTALL_LIB=@INSTALL_LIB@

R2_LIBR_PLUGINS_DIR=$(shell r2 -H R2_LIBR_PLUGINS)
Expand Down
8 changes: 7 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include ../config.mk
CFLAGS+=-g

MOD=core_yara
MKDIR=mkdir -p
RULESDIR=rules-yara3

all: $(MOD).$(LIBEXT)
Expand All @@ -18,8 +19,10 @@ mrproper: clean

install:
${INSTALL_LIB} ${MOD}.${LIBEXT} $(R2_LIBR_PLUGINS_DIR)/${MOD}.${LIBEXT}
mkdir -p $(R2_LIBR_PLUGINS_DIR)/$(RULESDIR)
$(MKDIR) $(R2_LIBR_PLUGINS_DIR)/$(RULESDIR)
cp -f ../rules/*.yara $(R2_LIBR_PLUGINS_DIR)/$(RULESDIR)/
$(MKDIR) $(MANDIR)/man7
cp -f ../doc/r2yara.7 $(MANDIR)/man7/r2yara.7

user-install:
${INSTALL_LIB} ${MOD}.${LIBEXT} $(R2PM_USRPLUGIN_DIR)/${MOD}.${LIBEXT}
Expand All @@ -30,10 +33,13 @@ symstall:
ln -fs ${PWD}/${MOD}.${LIBEXT} $(R2PM_USRPLUGIN_DIR)/$(MOD).$(LIBEXT)
mkdir -p $(R2PM_USRPLUGIN_DIR)/$(RULESDIR)
for a in *.gz ; do ln -fs $(PWD)/$$a $(R2PM_USRPLUGIN_DIR)/$(RULESDIR)/$$a ; done
$(MKDIR) $(MANDIR)/man7
ln -fs $(shell pwd)/../doc/r2yara.7 $(MANDIR)/man7/r2yara.7

uninstall:
rm -f ${R2_LIBR_PLUGINS_DIR}/$(MOD).$(LIBEXT)
rm -rf $(R2_LIBR_PLUGINS_DIR)/$(RULESDIR)
rm -f $(MANDIR)/man7/r2yara.7

user-uninstall:
rm -f ${R2PM_USRPLUGIN_DIR}/$(MOD).$(LIBEXT)
Expand Down

0 comments on commit 94d0261

Please sign in to comment.