Skip to content
This repository has been archived by the owner on May 31, 2018. It is now read-only.

Commit

Permalink
added Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarquis committed Dec 12, 2017
1 parent f4b664d commit 947e274
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,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)$(PREFIX)/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)$(PREFIX)/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

0 comments on commit 947e274

Please sign in to comment.