Index: cogito-0.18.2/Makefile
--- cogito-0.18.2/Makefile.orig	2006-11-17 01:37:24.000000000 +0100
+++ cogito-0.18.2/Makefile	2012-06-18 16:02:16.000000000 +0200
@@ -2,8 +2,8 @@
 prefix="$(HOME)"
 
 bindir=$(prefix)/bin
-libdir=$(prefix)/lib/cogito
-sharedir=$(prefix)/share/cogito
+libdir=$(prefix)/lib/git/cogito
+sharedir=$(prefix)/share/git/cogito
 
 INSTALL?=install
 
Index: gc-utils/doc/Makefile
--- gc-utils/doc/Makefile.orig	2008-08-01 17:39:15.000000000 +0200
+++ gc-utils/doc/Makefile	2012-06-18 16:02:16.000000000 +0200
@@ -29,17 +29,17 @@
 
 .PHONY: gen install clean uninstall
 
-gen:: $(manpagesgz)
+gen:: $(manpages)
 
 $(manpagesgz):
 	$(QUIET_GEN) cat $(@:../build/%.1.gz=%.1) | sed -e 's,\$$VERSION\$$,$(VERSION_SQ),' | gzip -9 > $@
 
-install: $(manpagesgz)
+install: $(manpages)
 	@$(MKINSTALLDIRS) $(DESTDIR)$(man1dir)
 ifndef V
-	@$(foreach f, $(manpagesgz), $(QUIET_INSTALL) $(INSTALL) -m644 $f "$(DESTDIR)$(man1dir)/$(f:../build/%=%)" ;)
+	@$(foreach f, $(manpages), $(QUIET_INSTALL) $(INSTALL) -m644 $f "$(DESTDIR)$(man1dir)/$(f:../build/%=%)" ;)
 else
-	$(foreach f, $(manpagesgz), $(INSTALL) -m644 $f "$(DESTDIR)$(man1dir)/$(f:../build/%=%)" ;)
+	$(foreach f, $(manpages), $(INSTALL) -m644 $f "$(DESTDIR)$(man1dir)/$(f:../build/%=%)" ;)
 endif
 
 uninstall:
Index: git-1.7.11.4/Documentation/Makefile
--- git-1.7.11.4/Documentation/Makefile.orig	2012-06-18 00:01:30.000000000 +0200
+++ git-1.7.11.4/Documentation/Makefile	2012-06-18 16:02:16.000000000 +0200
@@ -56,10 +56,10 @@
 infodir?=$(prefix)/share/info
 MAKEINFO=makeinfo
 INSTALL_INFO=install-info
-DOCBOOK2X_TEXI=docbook2x-texi
+DOCBOOK2X_TEXI=docbook2texi
 DBLATEX=dblatex
 ifndef PERL_PATH
-	PERL_PATH = /usr/bin/perl
+	PERL_PATH = perl
 endif
 
 -include ../config.mak.autogen
Index: git-1.7.11.4/Makefile
--- git-1.7.11.4/Makefile.orig	2012-06-18 00:01:30.000000000 +0200
+++ git-1.7.11.4/Makefile	2012-06-18 16:02:16.000000000 +0200
@@ -339,12 +339,12 @@
 bindir = $(prefix)/$(bindir_relative)
 mandir = share/man
 infodir = share/info
-gitexecdir = libexec/git-core
+gitexecdir = libexec/git
 mergetoolsdir = $(gitexecdir)/mergetools
 sharedir = $(prefix)/share
 gitwebdir = $(sharedir)/gitweb
 localedir = $(sharedir)/locale
-template_dir = share/git-core/templates
+template_dir = share/git/templates
 htmldir = share/doc/git-doc
 ETC_GITCONFIG = $(sysconfdir)/gitconfig
 ETC_GITATTRIBUTES = $(sysconfdir)/gitattributes
@@ -1455,10 +1455,10 @@
 else
 	ifdef CURLDIR
 		# Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
-		BASIC_CFLAGS += -I$(CURLDIR)/include
-		CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl
+ 		BASIC_CFLAGS += `$(CURLDIR)/bin/curl-config --cflags`
+ 		CURL_LIBCURL = `$(CURLDIR)/bin/curl-config --libs`
 	else
-		CURL_LIBCURL = -lcurl
+		CURL_LIBCURL = -lcurl -lssl -lcrypto
 	endif
 	ifdef NEEDS_SSL_WITH_CURL
 		CURL_LIBCURL +=	-lssl
@@ -2553,6 +2553,12 @@
 	$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
+	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(prefix)/lib'
+	$(INSTALL) -m 644 $(LIB_FILE) '$(DESTDIR_SQ)$(prefix)/lib/libgit.a'
+	$(INSTALL) -m 644 $(XDIFF_LIB) '$(DESTDIR_SQ)$(prefix)/lib/libgit-xdiff.a'
+	$(INSTALL) -m 644 $(VCSSVN_LIB) '$(DESTDIR_SQ)$(prefix)/lib/libgit-vcssvn.a'
+	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(prefix)/include/git'
+	for h in $(LIB_H); do b=`echo $$h | sed -e 's;/*[^/][^/]*$$;;'`; $(INSTALL) -d -m 755 $(DESTDIR_SQ)$(prefix)/include/git/$$b; $(INSTALL) -m 644 $$h $(DESTDIR_SQ)$(prefix)/include/git/$$h; done
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
 	$(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
Index: git-1.7.11.4/config.mak.in
--- git-1.7.11.4/config.mak.in.orig	2012-06-18 00:01:30.000000000 +0200
+++ git-1.7.11.4/config.mak.in	2012-06-18 16:02:16.000000000 +0200
@@ -15,9 +15,9 @@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 bindir = @bindir@
-gitexecdir = @libexecdir@/git-core
+gitexecdir = @libexecdir@/git
 datarootdir = @datarootdir@
-template_dir = @datadir@/git-core/templates
+template_dir = @datadir@/git/templates
 sysconfdir = @sysconfdir@
 
 mandir=@mandir@
Index: git-1.7.11.4/perl/Makefile.PL
--- git-1.7.11.4/perl/Makefile.PL.orig	2012-06-18 00:01:30.000000000 +0200
+++ git-1.7.11.4/perl/Makefile.PL	2012-06-18 16:02:16.000000000 +0200
@@ -55,5 +55,6 @@
 	PM		=> \%pm,
 	PM_FILTER	=> qq[\$(PERL) -pe "s<\\Q++LOCALEDIR++\\E><$localedir>"],
 	MAKEFILE	=> 'perl.mak',
-	INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'
+	INSTALLDIRS	=> 'vendor',
+	INSTALLSITEMAN3DIR => '$(SITEPREFIX)/man/man3'
 );
Index: git-1.7.11.4/sha1_file.c
--- git-1.7.11.4/sha1_file.c.orig	2012-06-18 00:01:30.000000000 +0200
+++ git-1.7.11.4/sha1_file.c	2012-06-18 16:32:16.000000000 +0200
@@ -20,6 +20,7 @@
 #include "sha1-lookup.h"
 #include "bulk-checkin.h"
 #include "streaming.h"
+#include <sys/resource.h>
 
 #ifndef O_NOATIME
 #if defined(__linux__) && (defined(__i386__) || defined(__PPC__))
Index: git-1.7.11.4/templates/Makefile
--- git-1.7.11.4/templates/Makefile.orig	2012-06-18 00:01:30.000000000 +0200
+++ git-1.7.11.4/templates/Makefile	2012-06-18 16:02:16.000000000 +0200
@@ -8,7 +8,7 @@
 TAR ?= tar
 RM ?= rm -f
 prefix ?= $(HOME)
-template_instdir ?= $(prefix)/share/git-core/templates
+template_instdir ?= $(prefix)/share/git/templates
 # DESTDIR=
 
 ifndef SHELL_PATH
Index: stgit-0.14.3/setup.py
--- stgit-0.14.3/setup.py.orig	2008-06-09 00:26:03.000000000 +0200
+++ stgit-0.14.3/setup.py	2012-06-18 16:02:16.000000000 +0200
@@ -61,10 +61,10 @@
       long_description = 'Push/pop utility on top of GIT',
       scripts = ['stg'],
       packages = ['stgit', 'stgit.commands'],
-      data_files = [('share/stgit/templates', glob.glob('templates/*.tmpl')),
-                    ('share/stgit/examples', glob.glob('examples/*.tmpl')),
-                    ('share/stgit/examples', ['examples/gitconfig']),
-                    ('share/stgit/contrib', ['contrib/diffcol.sh',
+      data_files = [('share/git/stgit/templates', glob.glob('templates/*.tmpl')),
+                    ('share/git/stgit/examples', glob.glob('examples/*.tmpl')),
+                    ('share/git/stgit/examples', ['examples/gitconfig']),
+                    ('share/git/stgit/contrib', ['contrib/diffcol.sh',
                                              'contrib/stgbashprompt.sh',
                                              'contrib/stgit-completion.bash']),
                     ('share/doc/stgit', glob.glob('doc/*.txt'))]
Index: stgit-0.14.3/stg
--- stgit-0.14.3/stg.orig	2006-04-07 23:38:54.000000000 +0200
+++ stgit-0.14.3/stg	2012-06-18 16:02:16.000000000 +0200
@@ -26,12 +26,13 @@
 # It is assumed that the user installed StGIT using the --prefix= option
 prefix, bin = os.path.split(sys.path[0])
 
-if bin == 'bin' and prefix != sys.prefix:
+if bin == 'bin':
     sys.prefix = prefix
     sys.exec_prefix = prefix
 
     major, minor = sys.version_info[0:2]
-    local_path = [os.path.join(prefix, 'lib', 'python'),
+    local_path = [os.path.join(prefix, 'lib', 'git'),
+                  os.path.join(prefix, 'lib', 'python'),
                   os.path.join(prefix, 'lib', 'python%s.%s' % (major, minor)),
                   os.path.join(prefix, 'lib', 'python%s.%s' % (major, minor),
                                'site-packages')]
