aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-09-03 18:50:21 +0200
committerpml68 <contact@pml68.dev>2025-09-03 20:00:18 +0200
commitdaca3448c0a0b06b3977989b095cbab87a54ed68 (patch)
tree0a896423b92da5796b1e47e3b5de617181bc85bd /Makefile
parentfeat: add man page (diff)
downloadaur-1.0.0.tar.gz
feat: add Makefilev1.0.0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2b9ff14
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+PREFIX = /usr
+MANDIR = $(PREFIX)/share/man
+BASHDIR = $(PREFIX)/share/bash-completion/completions
+FISHDIR = $(PREFIX)/share/fish/vendor_completions.d
+
+.PHONY: default install
+
+default: aur.1 shell-completions/aur-completion.bash
+
+shell-completions/aur-completion.bash:
+ cd shell-completions && bash-completor -c aur.completor.bash
+
+aur.1:
+ help2man -n "A simple script for AUR package management" -N ./aur -o aur.1
+
+install: shell-completions/aur-completion.bash aur.1
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin
+ @mkdir -p $(DESTDIR)$(MANDIR)/man1
+ @mkdir -p $(DESTDIR)$(BASHDIR)
+ @mkdir -p $(DESTDIR)$(FISHDIR)
+ cp -p aur $(DESTDIR)$(PREFIX)/bin/aur
+ cp -p aur.1 $(DESTDIR)$(MANDIR)/man1
+ cp -p shell-completions/aur-completion.bash $(DESTDIR)$(BASHDIR)/aur
+ cp -p shell-completions/aur.fish $(DESTDIR)$(FISHDIR)/aur.fish
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/aur