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

Commit

Permalink
Add PREFIX and DESTDIR to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaelgv committed Dec 11, 2017
1 parent 7cfa941 commit c5947e8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ NAME = pacaur
VERSION = 4.7.10
PREFIX ?= /usr/local


# default target
all: doc

Expand All @@ -18,13 +19,13 @@ doc:
#install pacaur
install:
@echo "Install $(NAME)..."
@install -D -m644 ./config "/etc/xdg/pacaur/config"
@install -D -m755 ./pacaur "/usr/bin/$(NAME)"
@install -D -m644 ./bash.completion "/usr/share/bash-completion/completions/$(NAME)"
@install -D -m644 ./zsh.completion "/usr/share/zsh/site-functions/_pacaur"
@install -D -m644 ./pacaur.8 "/usr/share/man/man8/pacaur.8"
@install -D -m644 ./LICENSE "/usr/share/licenses/pacaur/LICENSE"
@install -D -m644 ./config "$(DESTDIR)/etc/xdg/pacaur/config"
@install -D -m755 ./pacaur "$(DESTDIR)$(PREFIX)/bin/$(NAME)"
@install -D -m644 ./bash.completion "$(DESTDIR)$(PREFIX)/share/bash-completion/completions/$(NAME)"
@install -D -m644 ./zsh.completion "$(DESTDIR)$(PREFIX)/share/zsh/site-functions/_pacaur"
@install -D -m644 ./pacaur.8 "$(DESTDIR)$(PREFIX)/share/man/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 "/usr/share/locale/$$i/LC_MESSAGES/"; \
msgfmt ./po/$$i.po -o "/usr/share/locale/$$i/LC_MESSAGES/pacaur.mo"; \
mkdir -p "$(DESTDIR)$(PREFIX)/share/locale/$$i/LC_MESSAGES/"; \
msgfmt ./po/$$i.po -o "$(DESTDIR)$(PREFIX)/share/locale/$$i/LC_MESSAGES/pacaur.mo"; \
done

0 comments on commit c5947e8

Please sign in to comment.