tags 718395 + patch
thanks

I just sent this to the git in Debian maintainers:

From 4b1712859b00312a13ae5a2ac0eba78b71419e83 Mon Sep 17 00:00:00 2001
From: Thorsten Glaser <t.gla...@tarent.de>
Date: Fri, 30 Aug 2013 13:04:20 +0200
Subject: Install mw-to-git into production location. (Closes: #718395)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This makes the following things work (tested):

① git clone -c remote.origin.pages='PluginDemo' \
  mediawiki::https://evolvis.org/plugins/mediawiki/wiki/evolvis

(Cloning from an Evolvis (FusionForge) Wiki; pushing not tested
because the Wiki in question does not allow anonymous write access.)

② git clone -c remote.origin.pages='User:mirabilos' \
  mediawiki::http://en.wikipedia.org/w user_mirabilos
③ cd user_mirabilos; jupp User:Mirabilos.mw
④ git commit -a -m …; git push

(Cloning from Wikipedia, editing, pushing; shows up as anonymous
commit from my IPv4 address.)

This functionality requires two additional packages installed;
adjust Suggests appropriately. (Testing this in sid is a tad
hard until the Perl 5.18 transition is over.)

“git help mw”, “git help remote-mediawiki” do not work; but then,
upstream does not provide a lot of help in the first place. If
it’s necessary I may consider writing appropriate manpages after
I’ve used this for a while and learned of its possibilities.

Signed-off-by: Thorsten Glaser <t.gla...@tarent.de>
---
 debian/changelog    |  9 +++++++++
 debian/control      |  3 ++-
 debian/git-doc.docs |  1 +
 debian/rules        | 11 +++++++++++
 4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index eb8d132..e260c5a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+git (1:1.8.4~rc3-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+
+  [ Thorsten Glaser ]
+  * Install mw-to-git into production location. (Closes: #718395)
+
+ -- Thorsten Glaser <t.gla...@tarent.de>  Fri, 30 Aug 2013 11:12:35 +0200
+
 git (1:1.8.4~rc3-1) unstable; urgency=low
 
   * new upstream release candidate.
diff --git a/debian/control b/debian/control
index 53ed44e..689766b 100644
--- a/debian/control
+++ b/debian/control
@@ -26,7 +26,8 @@ Depends: ${shlibs:Depends}, perl-modules, liberror-perl,
 Recommends: patch, less, rsync, ssh-client
 Suggests: gettext-base, git-daemon-run | git-daemon-sysvinit,
  git-doc, git-el, git-email, git-gui, gitk, gitweb,
- git-arch, git-bzr, git-cvs, git-svn
+ git-arch, git-bzr, git-cvs, git-svn,
+ libmediawiki-api-perl, libdatetime-format-iso8601-perl
 Replaces: gitweb (<< 1:1.7.4~rc1),
  git-core (<< 1:1.7.0.4-1.)
 Breaks: bash-completion (<< 1:1.90-1), gitweb (<< 1:1.7.4~rc1),
diff --git a/debian/git-doc.docs b/debian/git-doc.docs
index 4caccf4..c63b858 100644
--- a/debian/git-doc.docs
+++ b/debian/git-doc.docs
@@ -1,3 +1,4 @@
 tmp/html/*
 debian/git-remote-bzr.html
 Documentation/technical
+contrib/mw-to-git/git-remote-mediawiki.txt
diff --git a/debian/rules b/debian/rules
index 99275b4..c291242 100755
--- a/debian/rules
+++ b/debian/rules
@@ -65,6 +65,7 @@ build-arch: deb-checkdir build-arch-stamp
 build-arch-stamp: patch-stamp
        -$(CC) -v
        DESTDIR='$(GIT)' $(MAKE) all $(OPTS)
+       DESTDIR='$(GIT)' $(MAKE) -Ccontrib/mw-to-git all $(OPTS)
        test -z '$(TEST)' || \
          DESTDIR='$(GIT)' $(MAKE) $(TEST) $(OPTS) || \
          GIT_TEST_OPTS=--verbose DESTDIR='$(GIT)' $(MAKE) $(TEST) $(OPTS)
@@ -93,6 +94,10 @@ clean: deb-checkdir
        rm -f debian/git-remote-bzr debian/test-bzr.sh
        rm -f debian/git-remote-bzr.xml debian/git-remote-bzr.html
        rm -f Documentation/git-remote-bzr.1
+       # we cannot fix the Makefile as we use manual patching :(
+       :>dummy
+       $(MAKE) -Ccontrib/mw-to-git clean $(OPTS) \
+           INSTLIBDIR=$$(pwd) GIT_MEDIAWIKI_PM=dummy
        $(MAKE) clean $(OPTS)
        ! test -e patch-stamp || \
          for i in `ls -1r debian/diff/*.diff debian/diff/*.patch \
@@ -176,6 +181,12 @@ install-arch: deb-checkdir deb-checkuid build-arch-stamp
        ln -s ../../../git-core/contrib/hooks \
          '$(GIT)'/usr/share/doc/git/contrib/
        find '$(GIT)'/usr/share/doc/git/ -name .gitignore | xargs rm -f
+       # move mw-to-git from docs to usable (Debian #718395)
+       mv '$(GIT)'/usr/share/doc/git/contrib/mw-to-git/Git/Mediawiki.pm \
+           '$(GIT)'/usr/share/perl5/Git/
+       cd '$(GIT)'/usr/share/doc/git/contrib/mw-to-git && install \
+           -m0755 git-remote-mediawiki git-mw '$(GIT)'/usr/lib/git-core/
+       rm -rf '$(GIT)'/usr/share/doc/git/contrib/mw-to-git
 
 $(patsubst %,%.install,$(PKG_INDEP)) git-core.install: install-indep
 install-indep: build-arch-stamp build-indep-stamp
-- 
1.8.4.rc3


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to