From c58a6f5b142194637c51be6d9462b77bfda7c24b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 7 Jul 2016 23:15:52 -0400 Subject: tidy/update --- .local/bin/setup | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 .local/bin/setup (limited to '.local/bin/setup') diff --git a/.local/bin/setup b/.local/bin/setup new file mode 100755 index 0000000..e26c590 --- /dev/null +++ b/.local/bin/setup @@ -0,0 +1,50 @@ +#!/usr/bin/make -f + +HOME = $(shell cd "$(dir $(lastword $(MAKEFILE_LIST)))" && git rev-parse --show-toplevel) +export HOME +undefine XDG_CONFIG_DIR + +LANG = C +export LANG +undefine $(filter LC_%,$(.VARIABLES)) + +CFLAGS += -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter + +dirs = \ + $(HOME)/packages/pkgdest \ + $(HOME)/packages/srcdest \ + $(HOME)/packages/srcpkgdest \ + $(HOME)/packages/logdest \ + $(HOME)/packages/builddir + +all: \ + $(HOME)/.local/bin/autobuild \ + $(HOME)/.ssh/id_rsa \ + $(HOME)/.ssh/id_rsa.pub \ + $(HOME)/.gnupg/secring.gpg \ + $(HOME)/packages/abslibre \ + $(dirs) + +$(HOME)/.local/bin/autobuild: %: %.c + cd $(@D) && $(LINK.c) $(notdir $^) $(LOADLIBES) $(LDLIBS) -o $(@F) && chmod 6755 $(@F) + +$(HOME)/.ssh/id_% $(HOME)/.ssh/id_%.pub: + ssh-keygen -N '' -f $(@D)/id_$* + +$(HOME)/.gnupg/secring.gpg: | $(HOME)/.config/git/config + chmod 700 $(@D) + printf '%s\n' \ + 'Key-Type: default' \ + 'Subkey-Type: default' \ + "Name-Real: $$(git config user.name)" \ + "Name-Email: $$(git config user.email)" \ + 'Expire-Date: 0' \ + | gpg --gen-key --batch + +$(HOME)/packages/abslibre: + createworkdir + +$(dirs): %: + mkdir -p -- $@ + +.DELETE_ON_ERROR: -- cgit v1.2.2