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 <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2015-06-02 10:48:31 +02:00
parent 10ecd3982d
commit 124ad00997
5 changed files with 23 additions and 5 deletions

View file

@ -34,8 +34,7 @@ Setup on Arch Linux
7) Install the git-auth wrapper script: 7) Install the git-auth wrapper script:
# cd /srv/http/aurweb/git-interface/ # cd /srv/http/aurweb/git-interface/
# cp git-auth.sh /usr/local/bin/aur-git-auth # make && make install
# chmod 755 /usr/local/bin/aur-git-auth
8) Configure sshd(8) for the AUR. Add the following lines at the end of your 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 sshd_config(5) and restart the sshd. Note that OpenSSH 6.9 or newer is

18
git-interface/Makefile Normal file
View file

@ -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.in >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

1
git-interface/config.mk Normal file
View file

@ -0,0 +1 @@
PREFIX = /usr/local

View file

@ -1,3 +0,0 @@
#!/bin/sh
/srv/http/aurweb/git-interface/git-auth.py "$1" "$2"

View file

@ -0,0 +1,3 @@
#!/bin/sh
%GIT_INTERFACE_DIR%/git-auth.py "$1" "$2"