From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 51A7C1393DD for ; Sun, 31 Aug 2014 21:19:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5CF37E0BFB; Sun, 31 Aug 2014 21:19:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 733CFE0BF4 for ; Sun, 31 Aug 2014 21:19:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6AE4033FEA4 for ; Sun, 31 Aug 2014 21:19:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0EDAF45F4 for ; Sun, 31 Aug 2014 21:19:07 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1409519938.ce8ecda4ece83c04d481acacbed97a61e989cb64.mgorny@gentoo> Subject: [gentoo-commits] proj/gentoo-bashcomp:master commit in: / X-VCS-Repository: proj/gentoo-bashcomp X-VCS-Files: Makefile X-VCS-Directories: / X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: ce8ecda4ece83c04d481acacbed97a61e989cb64 X-VCS-Branch: master Date: Sun, 31 Aug 2014 21:19:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e4654608-e05e-46e8-ae17-cd0ab4b6c505 X-Archives-Hash: a6dcc207e8650ead16e32ff58fadc595 commit: ce8ecda4ece83c04d481acacbed97a61e989cb64 Author: Michał Górny gentoo org> AuthorDate: Sun Aug 31 20:30:03 2014 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Aug 31 21:18:58 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-bashcomp.git;a=commit;h=ce8ecda4 Makefile: introduce a new 'install' rule. That handles proper install paths and substitutions. --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Makefile b/Makefile index da4702b..f167c7b 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,40 @@ distapp = gentoo-bashcomp distver := $(shell date -u +%Y%m%d) distpkg := $(distapp)-$(distver) +DESTDIR = +EPREFIX = + +# prefer paths from pkg-config, fallback to sane defaults +completionsdir ?= $(or \ + $(shell pkg-config --variable=completionsdir bash-completion 2>/dev/null), \ + ${EPREFIX}/usr/share/bash-completion/completions) +helpersdir ?= $(or \ + $(shell pkg-config --variable=helpersdir bash-completion 2>/dev/null), \ + ${EPREFIX}/usr/share/bash-completion/helpers) +compatdir ?= $(or \ + $(shell pkg-config --variable=compatdir bash-completion 2>/dev/null), \ + ${EPREFIX}/etc/bash_completion.d) + +completions := $(wildcard completions/*) +helpers := $(wildcard helpers/*) +compats := $(wildcard compat/*) + +POSTINST_SED = sed -i -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" -e "s|@helpersdir@|$(helpersdir)|" + all: @echo Nothing to compile. +install: + install -d "$(DESTDIR)$(completionsdir)" + install -m0644 $(completions) "$(DESTDIR)$(completionsdir)" + $(POSTINST_SED) $(addprefix "$(DESTDIR)$(completionsdir)"/,$(notdir $(completions))) + install -d "$(DESTDIR)$(helpersdir)" + install -m0644 $(helpers) "$(DESTDIR)$(helpersdir)" + $(POSTINST_SED) $(addprefix "$(DESTDIR)$(helpersdir)"/,$(notdir $(helpers))) + install -d "$(DESTDIR)$(compatdir)" + install -m0644 $(compats) "$(DESTDIR)$(compatdir)" + $(POSTINST_SED) $(addprefix "$(DESTDIR)$(compatdir)"/,$(notdir $(compats))) + tag: git pull git tag -a $(distpkg) -m "tag $(distpkg)" From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4799A1382C5 for ; Fri, 2 Mar 2018 18:07:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3911BE0B1C; Fri, 2 Mar 2018 18:07:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 17201E0B1C for ; Fri, 2 Mar 2018 18:07:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 37240335C4F for ; Fri, 2 Mar 2018 18:07:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E7DB7238 for ; Fri, 2 Mar 2018 18:06:58 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1409519938.ce8ecda4ece83c04d481acacbed97a61e989cb64.mgorny@gentoo> Subject: [gentoo-commits] proj/gentoo-bashcomp:master commit in: / X-VCS-Repository: proj/gentoo-bashcomp X-VCS-Files: Makefile X-VCS-Directories: / X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: ce8ecda4ece83c04d481acacbed97a61e989cb64 X-VCS-Branch: master Date: Fri, 2 Mar 2018 18:06:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0a99c5ba-d986-4e52-afde-042b86b23776 X-Archives-Hash: e04dfbcb7611c84384e262095f2727f2 Message-ID: <20180302180658.fDB8FW0yNjRizojX4Fm_ncAVwI_zZG2WSb5eRt1BldA@z> commit: ce8ecda4ece83c04d481acacbed97a61e989cb64 Author: Michał Górny gentoo org> AuthorDate: Sun Aug 31 20:30:03 2014 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Aug 31 21:18:58 2014 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=ce8ecda4 Makefile: introduce a new 'install' rule. That handles proper install paths and substitutions. Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Makefile b/Makefile index da4702b..f167c7b 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,40 @@ distapp = gentoo-bashcomp distver := $(shell date -u +%Y%m%d) distpkg := $(distapp)-$(distver) +DESTDIR = +EPREFIX = + +# prefer paths from pkg-config, fallback to sane defaults +completionsdir ?= $(or \ + $(shell pkg-config --variable=completionsdir bash-completion 2>/dev/null), \ + ${EPREFIX}/usr/share/bash-completion/completions) +helpersdir ?= $(or \ + $(shell pkg-config --variable=helpersdir bash-completion 2>/dev/null), \ + ${EPREFIX}/usr/share/bash-completion/helpers) +compatdir ?= $(or \ + $(shell pkg-config --variable=compatdir bash-completion 2>/dev/null), \ + ${EPREFIX}/etc/bash_completion.d) + +completions := $(wildcard completions/*) +helpers := $(wildcard helpers/*) +compats := $(wildcard compat/*) + +POSTINST_SED = sed -i -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" -e "s|@helpersdir@|$(helpersdir)|" + all: @echo Nothing to compile. +install: + install -d "$(DESTDIR)$(completionsdir)" + install -m0644 $(completions) "$(DESTDIR)$(completionsdir)" + $(POSTINST_SED) $(addprefix "$(DESTDIR)$(completionsdir)"/,$(notdir $(completions))) + install -d "$(DESTDIR)$(helpersdir)" + install -m0644 $(helpers) "$(DESTDIR)$(helpersdir)" + $(POSTINST_SED) $(addprefix "$(DESTDIR)$(helpersdir)"/,$(notdir $(helpers))) + install -d "$(DESTDIR)$(compatdir)" + install -m0644 $(compats) "$(DESTDIR)$(compatdir)" + $(POSTINST_SED) $(addprefix "$(DESTDIR)$(compatdir)"/,$(notdir $(compats))) + tag: git pull git tag -a $(distpkg) -m "tag $(distpkg)"