From 9fc4189f2605f47fe3857c7d2a5fa750d801eaee Mon Sep 17 00:00:00 2001 From: Konstantinos Koukopoulos Date: Sun, 9 Oct 2016 16:57:08 +0300 Subject: [PATCH 1/3] add make install target for homebrew formula --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index b2e05ec..267b94f 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ CXXFLAGS ?= -g -O2 -Wall -Wold-style-cast +PREFIX ?= /usr/local CPPFLAGS += -D_FILE_OFFSET_BITS=64 CXXFLAGS += -std=c++11 @@ -43,4 +44,10 @@ clean: $(RM) *.1 ssh-agent-filter *.o test ! -d .git || git checkout -f -- version.h +install: ssh-agent-filter.1 + install -m 755 ssh-agent-filter $(PREFIX)/bin/ssh-agent-filter + install -m 755 afssh $(PREFIX)/bin/afssh + install -m 644 ssh-agent-filter.1 $(PREFIX)/man/man1/ssh-agent-filter.1 + + .PHONY: version.h From 30982e0b1b78ead22c9ae1bc7531acdb46f64286 Mon Sep 17 00:00:00 2001 From: Konstantinos Koukopoulos Date: Sun, 9 Oct 2016 19:06:36 +0300 Subject: [PATCH 2/3] support DESTDIR --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 267b94f..27e2bda 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,8 @@ CXXFLAGS ?= -g -O2 -Wall -Wold-style-cast PREFIX ?= /usr/local +bindir = $(PREFIX)/bin +mandir = $(PREFIX)/man CPPFLAGS += -D_FILE_OFFSET_BITS=64 CXXFLAGS += -std=c++11 @@ -45,9 +47,10 @@ clean: test ! -d .git || git checkout -f -- version.h install: ssh-agent-filter.1 - install -m 755 ssh-agent-filter $(PREFIX)/bin/ssh-agent-filter - install -m 755 afssh $(PREFIX)/bin/afssh - install -m 644 ssh-agent-filter.1 $(PREFIX)/man/man1/ssh-agent-filter.1 + mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 + install -m 755 ssh-agent-filter $(DESTDIR)$(bindir)/ssh-agent-filter + install -m 755 afssh $(DESTDIR)$(bindir)/afssh + install -m 644 ssh-agent-filter.1 $(DESTDIR)$(mandir)/man1/ssh-agent-filter.1 .PHONY: version.h From 885fb416e5a9bca0fd49be5e47aa35632af3e9e0 Mon Sep 17 00:00:00 2001 From: Konstantinos Koukopoulos Date: Tue, 11 Oct 2016 12:32:49 +0300 Subject: [PATCH 3/3] install afssh and ssh-askpass-noinput with manpages --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 27e2bda..4ccce5c 100644 --- a/Makefile +++ b/Makefile @@ -46,11 +46,14 @@ clean: $(RM) *.1 ssh-agent-filter *.o test ! -d .git || git checkout -f -- version.h -install: ssh-agent-filter.1 +install: all mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 install -m 755 ssh-agent-filter $(DESTDIR)$(bindir)/ssh-agent-filter install -m 755 afssh $(DESTDIR)$(bindir)/afssh + install -m 755 ssh-askpass-noinput $(DESTDIR)$(bindir)/ssh-askpass-noinput install -m 644 ssh-agent-filter.1 $(DESTDIR)$(mandir)/man1/ssh-agent-filter.1 + install -m 644 afssh.1 $(DESTDIR)$(mandir)/man1/afssh.1 + install -m 644 ssh-askpass-noinput.1 $(DESTDIR)$(mandir)/man1/ssh-askpass-noinput.1 .PHONY: version.h