From: Felipe Contreras <felipe.contreras@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] completion: move out of contrib
Date: Wed, 07 May 2014 05:10:03 -0500 [thread overview]
Message-ID: <536a067b3b1ca_5e8fbfd30879@nysa.notmuch> (raw)
In-Reply-To: <536989d764672_250b14ed2ec66@nysa.notmuch>
Felipe Contreras wrote:
> Yes, *if* they have been packaging them, they have a way. But what if
> they haven't been doing so?
>
> And for the ones that have a way, now they need one hack less.
As an example of all the hacks needed by a real distribution package,
here's the stuff ArchLinux packagers have to do:
# bash completion
mkdir -p "$pkgdir"/usr/share/bash-completion/completions/
install -m644 ./contrib/completion/git-completion.bash "$pkgdir"/usr/share/bash-completion/completions/git
# fancy git prompt
mkdir -p "$pkgdir"/usr/share/git/
install -m644 ./contrib/completion/git-prompt.sh "$pkgdir"/usr/share/git/git-prompt.sh
# emacs
make -C contrib/emacs prefix=/usr DESTDIR="$pkgdir" install
# gnome credentials helper
install -m755 contrib/credential/gnome-keyring/git-credential-gnome-keyring \
"$pkgdir"/usr/lib/git-core/git-credential-gnome-keyring
make -C contrib/credential/gnome-keyring clean
# the rest of the contrib stuff
cp -a ./contrib/* $pkgdir/usr/share/git/
# scripts are for python 2.x
sed -i 's|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' \
$(find "$pkgdir" -name '*.py') \
"$pkgdir"/usr/share/git/gitview/gitview \
"$pkgdir"/usr/share/git/remote-helpers/git-remote-bzr \
"$pkgdir"/usr/share/git/remote-helpers/git-remote-hg
sed -i 's|#![ ]*/usr/bin/python$|#!/usr/bin/python2|' \
"$pkgdir"/usr/share/git/svn-fe/svnrdump_sim.py
# remove perllocal.pod, .packlist, and empty directories.
rm -rf "$pkgdir"/usr/lib/perl5
And here's what debian packagers have to do:
# bash completion
install -d -m0755 '$(GIT)'/etc/bash_completion.d
install -m0644 contrib/completion/git-completion.bash \
'$(GIT)'/etc/bash_completion.d/git
# gitweb
install -d -m0755 '$(GIT)'/usr/share/gitweb
ln -s gitweb.cgi '$(GIT)'/usr/share/gitweb/index.cgi
# contrib hooks
install -d -m0755 '$(GIT)'/usr/share/git-core/contrib/hooks
install -m0644 contrib/hooks/* \
'$(GIT)'/usr/share/git-core/contrib/hooks/
# contrib
install -d -m0755 '$(GIT)'/usr/share/doc/git
cp -R contrib '$(GIT)'/usr/share/doc/git/
rm -rf '$(GIT)'/usr/share/doc/git/contrib/completion
rm -rf '$(GIT)'/usr/share/doc/git/contrib/emacs
find '$(GIT)'/usr/share/doc/git/contrib -type f | xargs chmod 0644
find '$(GIT)'/usr/share/doc/git/contrib -type d | xargs chmod 0755
# remove contrib hooks, they are now installed in
# /usr/share/git-core/contrib, keep symlink for backward compatibility
rm -rf '$(GIT)'/usr/share/doc/git/contrib/hooks
ln -s ../../../git-core/contrib/hooks \
'$(GIT)'/usr/share/doc/git/contrib/
find '$(GIT)'/usr/share/doc/git/ -name .gitignore | xargs rm -f
If our build system was sane, they wouldn't need so many hacks.
--
Felipe Contreras
next prev parent reply other threads:[~2014-05-07 10:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-03 0:36 [PATCH] completion: move out of contrib Felipe Contreras
2014-05-07 0:28 ` Junio C Hamano
2014-05-07 1:18 ` Felipe Contreras
2014-05-07 10:10 ` Felipe Contreras [this message]
2014-05-07 17:37 ` Junio C Hamano
2014-05-07 19:45 ` Felipe Contreras
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=536a067b3b1ca_5e8fbfd30879@nysa.notmuch \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).