From 124ad009975eb9dfed8141f24fccf12fdc720346 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 2 Jun 2015 10:48:31 +0200 Subject: Add a Makefile for the git-auth wrapper Avoid manual editing of the wrapper script when a non-standard path is used. Signed-off-by: Lukas Fleischer --- INSTALL | 3 +-- git-interface/Makefile | 18 ++++++++++++++++++ git-interface/config.mk | 1 + git-interface/git-auth.sh | 3 --- git-interface/git-auth.sh.in | 3 +++ 5 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 git-interface/Makefile create mode 100644 git-interface/config.mk delete mode 100755 git-interface/git-auth.sh create mode 100644 git-interface/git-auth.sh.in diff --git a/INSTALL b/INSTALL index 3aad515..a2a6153 100644 --- a/INSTALL +++ b/INSTALL @@ -34,8 +34,7 @@ Setup on Arch Linux 7) Install the git-auth wrapper script: # cd /srv/http/aurweb/git-interface/ - # cp git-auth.sh /usr/local/bin/aur-git-auth - # chmod 755 /usr/local/bin/aur-git-auth + # make && make install 8) Configure sshd(8) for the AUR. Add the following lines at the end of your sshd_config(5) and restart the sshd. Note that OpenSSH 6.9 or newer is diff --git a/git-interface/Makefile b/git-interface/Makefile new file mode 100644 index 0000000..8865790 --- /dev/null +++ b/git-interface/Makefile @@ -0,0 +1,18 @@ +GIT_INTERFACE_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) + +include config.mk + +git-auth.sh: + sed 's#%GIT_INTERFACE_DIR%#$(GIT_INTERFACE_DIR)#' git-auth.sh + chmod +x git-auth.sh + +install: git-auth.sh + install -Dm0755 git-auth.sh "$(DESTDIR)$(PREFIX)/bin/aur-git-auth" + +uninstall: + rm -f "$(DESTDIR)$(PREFIX)/bin/aur-git-auth" + +clean: + rm -f git-auth.sh + +.PHONY: install uninstall clean diff --git a/git-interface/config.mk b/git-interface/config.mk new file mode 100644 index 0000000..4d794a1 --- /dev/null +++ b/git-interface/config.mk @@ -0,0 +1 @@ +PREFIX = /usr/local diff --git a/git-interface/git-auth.sh b/git-interface/git-auth.sh deleted file mode 100755 index a5caeec..0000000 --- a/git-interface/git-auth.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/srv/http/aurweb/git-interface/git-auth.py "$1" "$2" diff --git a/git-interface/git-auth.sh.in b/git-interface/git-auth.sh.in new file mode 100644 index 0000000..223816a --- /dev/null +++ b/git-interface/git-auth.sh.in @@ -0,0 +1,3 @@ +#!/bin/sh + +%GIT_INTERFACE_DIR%/git-auth.py "$1" "$2" -- cgit v1.2.3-70-g09d2