1
0
mirror of https://github.com/moparisthebest/sslh synced 2024-11-28 03:52:21 -05:00

Merge pull request #52 from Somasis/master

Makefile: use more variables for install directories
This commit is contained in:
yrutschle 2015-06-22 11:59:52 +02:00
commit ba945f1a8f

View File

@ -5,7 +5,9 @@ USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files)
USELIBWRAP?= # Use libwrap? USELIBWRAP?= # Use libwrap?
USELIBCAP= # Use libcap? USELIBCAP= # Use libcap?
COV_TEST= # Perform test coverage? COV_TEST= # Perform test coverage?
PREFIX?=/usr/local PREFIX?=/usr
BINDIR?=$(PREFIX)/sbin
MANDIR?=$(PREFIX)/share/man/man8
MAN=sslh.8.gz # man page name MAN=sslh.8.gz # man page name
@ -68,10 +70,10 @@ release:
# generic install: install binary and man page # generic install: install binary and man page
install: sslh $(MAN) install: sslh $(MAN)
mkdir -p $(DESTDIR)$(PREFIX)/sbin mkdir -p $(DESTDIR)/$(BINDIR)
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man8 mkdir -p $(DESTDIR)/$(MANDIR)
install -p sslh-fork $(DESTDIR)$(PREFIX)/sbin/sslh install -p sslh-fork $(DESTDIR)/$(BINDIR)/sslh
install -p -m 0644 $(MAN) $(DESTDIR)$(PREFIX)/share/man/man8/$(MAN) install -p -m 0644 $(MAN) $(DESTDIR)/$(MANDIR)/$(MAN)
# "extended" install for Debian: install startup script # "extended" install for Debian: install startup script
install-debian: install sslh $(MAN) install-debian: install sslh $(MAN)
@ -80,7 +82,7 @@ install-debian: install sslh $(MAN)
update-rc.d sslh defaults update-rc.d sslh defaults
uninstall: uninstall:
rm -f $(DESTDIR)$(PREFIX)/sbin/sslh $(DESTDIR)$(PREFIX)/share/man/man8/$(MAN) $(DESTDIR)/etc/init.d/sslh $(DESTDIR)/etc/default/sslh rm -f $(DESTDIR)$(BINDIR)/sslh $(DESTDIR)$(MANDIR)/$(MAN) $(DESTDIR)/etc/init.d/sslh $(DESTDIR)/etc/default/sslh
update-rc.d sslh remove update-rc.d sslh remove
distclean: clean distclean: clean