forked from rmarquis/pacaur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (41 loc) · 1.69 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
##
# pacaur - An AUR helper that minimizes user interaction
##
VERSION = $(shell git describe --always | sed 's/-/./g')
PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/share/man
# default target
all: doc
# documentation
doc:
@echo "Generating documentation..."
@pod2man --utf8 --section=8 --center="Pacaur Manual" --name="PACAUR" \
--release="pacaur $(VERSION)" ./README.pod > ./pacaur.8
# aux
install:
@echo "Installing..."
@install -D -m644 ./config $(DESTDIR)/etc/xdg/pacaur/config
@install -D -m755 ./pacaur $(DESTDIR)$(PREFIX)/bin/pacaur
@install -D -m644 ./bash.completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/pacaur
@install -D -m644 ./zsh.completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_pacaur
@install -D -m644 ./pacaur.8 $(DESTDIR)$(MANPREFIX)/man8/pacaur.8
@install -D -m644 ./LICENSE $(DESTDIR)$(PREFIX)/share/licenses/pacaur/LICENSE
@for i in {ca,da,de,es,fi,fr,hu,it,ja,nb,nl,pl,pt,ru,sk,sl,sr,sr@latin,tr,zh_CN}; do \
mkdir -p "$(DESTDIR)$(PREFIX)/share/locale/$$i/LC_MESSAGES/"; \
msgfmt ./po/$$i.po -o "$(DESTDIR)$(PREFIX)/share/locale/$$i/LC_MESSAGES/pacaur.mo"; \
done
uninstall:
@echo "Uninstalling..."
@$(RM) $(DESTDIR)/etc/xdg/pacaur/config
@$(RM) $(DESTDIR)$(PREFIX)/bin/pacaur
@$(RM) $(DESTDIR)$(PREFIX)/share/bash-completion/completions/pacaur
@$(RM) $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_pacaur
@$(RM) $(DESTDIR)$(MANPREFIX)/man8/pacaur.8
@$(RM) $(DESTDIR)$(PREFIX)/share/licenses/pacaur/LICENSE
@for i in {ca,da,de,es,fi,fr,hu,it,ja,nb,nl,pl,pt,ru,sk,sl,sr,sr@latin,tr,zh_CN}; do \
$(RM) "$(DESTDIR)$(PREFIX)/share/locale/$$i/LC_MESSAGES/pacaur.mo"; \
done
clean:
@echo "Cleaning..."
@$(RM) ./pacaur.8
.PHONY: doc install uninstall clean