-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Package: svn-buildpackage
Severity: wishlist
Tags: patch
Hello,
I wanted to add a small patch to allow bash_completion, but I
realized that the main Makefile is not the most suited place to make
modifications to make sure the file I added is installed, so I
started fiddling with debian/rules, Makefile and dirs to achieve
what I wanted to do.
I am uneasy about committing this change since I dislike the fact
that the Makefile itself does not provide a full install, while the
debian/rules files seems to have became the de-facto means to
install the package. (I am aware that svn-buildpackage is a native
package, but probably it would make sense to move a part of the
things in the dedian/rules file into Makefile).
What do you think? Should I start cleaning up debian/rules by moving
things like man pages generation in Makefile, or should I kill the
Makefile? Currently we are in between and is not clean at all.
Attached is a first ugly draft patch that just installs the thing in
there (and should show what I mean with this mail).
P.S.: Isn't it time to make a [EMAIL PROTECTED]
- --
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFF+zChY8Chqv3NRNoRAt4wAJ4i3K5Rm60xdKXSj0aQO+O0C2/YbgCeLcjd
GNygr2T46ZV06goruScTxcA=
=pTjD
-----END PGP SIGNATURE-----
Index: contrib/svn-bp.completion
===================================================================
--- contrib/svn-bp.completion (revision 0)
+++ contrib/svn-bp.completion (revision 0)
@@ -0,0 +1,25 @@
+# -*- shell-script -*-
+
+# experimental svn-buildpackage bash completion
+
+# author: Eddy PetriÈor
+
+# created by modification of Martin Pool's bzr.simple bash completion
+# with inspiration from David Roundy's darcs completion script
+
+have=$(type svn-buildpackage 2>/dev/null|| true )
+
+_svnbp_commands()
+{
+ svn-buildpackage --help | grep '^ --' | sed 's:^\s*\(--[-a-zA-Z]*\)\s.*$:\1:g'
+}
+
+_svnbp()
+{
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ COMPREPLY=( $( compgen -W "$(_svnbp_commands)" | grep "^$cur") )
+}
+
+[ "$have" ] && complete -F _svnbp -o default svn-buildpackage
+
Index: debian/dirs
===================================================================
--- debian/dirs (revision 2441)
+++ debian/dirs (working copy)
@@ -1,2 +1,3 @@
+etc/bash_completion.d
usr/bin
usr/share/svn-buildpackage
Index: debian/rules
===================================================================
--- debian/rules (revision 2441)
+++ debian/rules (working copy)
@@ -53,6 +53,7 @@
cp svn-buildpackage svn-inject svn-upgrade uclean $(CURDIR)/debian/svn-buildpackage/usr/bin
cp SDCommon.pm $(CURDIR)/debian/svn-buildpackage/usr/share/svn-buildpackage
install -m755 contrib/svn-do $(CURDIR)/debian/svn-buildpackage/usr/share/svn-buildpackage/contrib
+ make DESTDIR=$(CURDIR)/debian/svn-buildpackage install
perl -pe 's/^\$$version=.*/\$$version="'$(shell dpkg-parsechangelog | grep ^Version | cut -f2 -d\ )'";/' -i $(CURDIR)/debian/svn-buildpackage/usr/share/svn-buildpackage/SDCommon.pm
# Build architecture-independent files here.
Index: Makefile
===================================================================
--- Makefile (revision 2441)
+++ Makefile (working copy)
@@ -9,8 +9,9 @@
make -C doc clean
install:
- cp svn-inject svn-upgrade svn-buildpackage $(DESTDIR)/bin
- cp *.1 $(prefix)/share/man/man1
+ cp svn-inject svn-upgrade svn-buildpackage $(DESTDIR)/usr/bin
+ -cp *.1 $(DESTDIR)/usr/share/man/man1
+ cp contrib/svn-bp.completion $(DESTDIR)/etc/bash_completion.d/svn-buildpackage
doc:
perl -pe 's/([^\\])-/$1\\-/g' -i *.1