mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-06 04:51:40 -07:00
adding make location configurations to ease proper packaging
this patch introduces DATADIR, MANDIR and DESTDIR to it is possible to configure the csv data location, the man location and also a packaging DESTDIR location which is needed for packaging in a subdir. PREFIX stays like it was so it is properly used in dpl4hydra.sh.
This commit is contained in:
parent
392251f218
commit
fa82feecc4
1 changed files with 13 additions and 10 deletions
23
Makefile.am
23
Makefile.am
|
@ -4,7 +4,10 @@
|
||||||
OPTS=-I. -O3
|
OPTS=-I. -O3
|
||||||
# -Wall -g -pedantic
|
# -Wall -g -pedantic
|
||||||
LIBS=-lm
|
LIBS=-lm
|
||||||
DIR=/bin
|
BINDIR = /bin
|
||||||
|
MANDIR ?= /man/man1
|
||||||
|
DATADIR ?= /etc
|
||||||
|
DESTDIR ?=
|
||||||
|
|
||||||
SRC = hydra-vnc.c hydra-pcnfs.c hydra-rexec.c hydra-nntp.c hydra-socks5.c \
|
SRC = hydra-vnc.c hydra-pcnfs.c hydra-rexec.c hydra-nntp.c hydra-socks5.c \
|
||||||
hydra-telnet.c hydra-cisco.c hydra-http.c hydra-ftp.c hydra-imap.c \
|
hydra-telnet.c hydra-cisco.c hydra-http.c hydra-ftp.c hydra-imap.c \
|
||||||
|
@ -57,15 +60,15 @@ strip: all
|
||||||
-echo OK > /dev/null && test -x xhydra && strip xhydra || echo OK > /dev/null
|
-echo OK > /dev/null && test -x xhydra && strip xhydra || echo OK > /dev/null
|
||||||
|
|
||||||
install: strip
|
install: strip
|
||||||
-mkdir -p $(PREFIX)$(DIR)
|
-mkdir -p $(DESTDIR)$(PREFIX)$(BINDIR)
|
||||||
cp -f hydra-wizard.sh $(BINS) $(PREFIX)$(DIR) && cd $(PREFIX)$(DIR) && chmod 755 hydra-wizard.sh $(BINS)
|
cp -f hydra-wizard.sh $(BINS) $(DESTDIR)$(PREFIX)$(BINDIR) && cd $(DESTDIR)$(PREFIX)$(BINDIR) && chmod 755 hydra-wizard.sh $(BINS)
|
||||||
-echo OK > /dev/null && test -x xhydra && cp xhydra $(PREFIX)$(DIR) && cd $(PREFIX)$(DIR) && chmod 755 xhydra || echo OK > /dev/null
|
-echo OK > /dev/null && test -x xhydra && cp xhydra $(DESTDIR)$(PREFIX)$(BINDIR) && cd $(DESTDIR)$(PREFIX)$(BINDIR) && chmod 755 xhydra || echo OK > /dev/null
|
||||||
-sed -e "s|^INSTALLDIR=.*|INSTALLDIR="$(PREFIX)"|" dpl4hydra.sh > $(PREFIX)/bin/dpl4hydra.sh
|
-sed -e "s|^INSTALLDIR=.*|INSTALLDIR="$(PREFIX)"|" dpl4hydra.sh | sed -e "s|^LOCATION=.*|LOCATION="$(DATADIR)"|" > $(DESTDIR)$(PREFIX)$(BINDIR)/dpl4hydra.sh
|
||||||
-chmod 755 $(PREFIX)/bin/dpl4hydra.sh
|
-chmod 755 $(DESTDIR)$(PREFIX)$(BINDIR)/dpl4hydra.sh
|
||||||
-mkdir -p $(PREFIX)/etc/
|
-mkdir -p $(DESTDIR)$(PREFIX)$(DATADIR)
|
||||||
-cp -f *.csv $(PREFIX)/etc/
|
-cp -f *.csv $(DESTDIR)$(PREFIX)$(DATADIR)
|
||||||
-mkdir -p $(PREFIX)/man/man1
|
-mkdir -p $(DESTDIR)$(PREFIX)$(MANDIR)
|
||||||
-cp -f hydra.1 xhydra.1 pw-inspector.1 $(PREFIX)/man/man1
|
-cp -f hydra.1 xhydra.1 pw-inspector.1 $(DESTDIR)$(PREFIX)$(MANDIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf xhydra pw-inspector hydra *.o core *.core *.stackdump *~ Makefile.in Makefile dev_rfc hydra.restore arm/*.ipk arm/ipkg/usr/bin/* hydra-gtk/src/*.o hydra-gtk/src/xhydra hydra-gtk/stamp-h hydra-gtk/config.status hydra-gtk/errors hydra-gtk/config.log hydra-gtk/src/.deps hydra-gtk/src/Makefile hydra-gtk/Makefile
|
rm -rf xhydra pw-inspector hydra *.o core *.core *.stackdump *~ Makefile.in Makefile dev_rfc hydra.restore arm/*.ipk arm/ipkg/usr/bin/* hydra-gtk/src/*.o hydra-gtk/src/xhydra hydra-gtk/stamp-h hydra-gtk/config.status hydra-gtk/errors hydra-gtk/config.log hydra-gtk/src/.deps hydra-gtk/src/Makefile hydra-gtk/Makefile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue