git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Walton <bwalton@artsci.utoronto.ca>
To: git@vger.kernel.org
Cc: Ben Walton <bwalton@artsci.utoronto.ca>
Subject: [PATCH] Add a git-completion rpm subpackage to the spec
Date: Sat, 20 Mar 2010 14:18:06 -0400	[thread overview]
Message-ID: <1269109086-8887-1-git-send-email-bwalton@artsci.utoronto.ca> (raw)
In-Reply-To: <1269045134-28072-1-git-send-email-icomfort@stanford.edu>

Make the rpm spec file create a git-completion subpackage that
contains the bash completion support from the contrib/ directory.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---

This is the alternate method for shipping the bash completion support.
I think I personally prefer this method, but I'd be happy to see
either solution ship as part of the .spec file so that I don't need to
continue handling it separately.

 git.spec.in |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/git.spec.in b/git.spec.in
index ee74a5e..d59747a 100644
--- a/git.spec.in
+++ b/git.spec.in
@@ -80,6 +80,13 @@ Requires:       git = %{version}-%{release}, tk >= 8.4
 %description gui
 Git GUI tool
 
+%package completion
+Summary:	Bash completion support for Git
+Group:		Development/Tools
+Requires:	git = %{version}-${release}, bash
+%description completion
+Bash completion support for Git
+
 %package -n gitk
 Summary:        Git revision tree visualiser ('gitk')
 Group:          Development/Tools
@@ -113,6 +120,8 @@ rm -rf $RPM_BUILD_ROOT
 make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT \
      %{path_settings} \
      INSTALLDIRS=vendor install %{!?_without_docs: install-doc}
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/bash_completion.d
+install -m 644 -T contrib/completion/git-completion.bash $RPM_BUILD_ROOT/%{_sysconfdir}/bash_completion.d/git
 test ! -d $RPM_BUILD_ROOT%{python_sitelib} || rm -fr $RPM_BUILD_ROOT%{python_sitelib}
 find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
 find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
@@ -177,6 +186,10 @@ rm -rf $RPM_BUILD_ROOT
 %{!?_without_docs: %{_mandir}/man1/git-citool.1*}
 %{!?_without_docs: %doc Documentation/git-citool.html}
 
+%files completion
+%defattr(-,root,root)
+%{_sysconfdir}/bash_completion.d/git
+
 %files -n gitk
 %defattr(-,root,root)
 %doc Documentation/*gitk*.txt
@@ -192,6 +205,10 @@ rm -rf $RPM_BUILD_ROOT
 # No files for you!
 
 %changelog
+* Sat Mar 20 2010 Ben Walton <bwalton@artsci.utoronto.ca>
+- Add git-completion subpackage to distribute bash completion from
+  contrib.
+
 * Sun Jan 31 2010 Junio C Hamano <gitster@pobox.com>
 - Do not use %define inside %{!?...} construct.
 
-- 
1.7.0

  reply	other threads:[~2010-03-20 18:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-20  0:32 [PATCH/RFC v2] RPM spec: optionally include bash completion support Ian Ward Comfort
2010-03-20 18:18 ` Ben Walton [this message]
2010-03-20 20:12   ` [PATCH] Add a git-completion rpm subpackage to the spec Junio C Hamano
2010-03-20 21:01     ` Ian Ward Comfort
2010-03-20 21:14     ` Ben Walton
2010-03-21  1:20       ` Junio C Hamano
2010-03-21 15:51       ` Todd Zullinger
2010-03-21 20:06         ` Ben Walton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1269109086-8887-1-git-send-email-bwalton@artsci.utoronto.ca \
    --to=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).