# $Id$ PNAME="git" PVER="1.7.6" PBUILD="r1" PCATEGORIE="dev-util" DESCRIPTION="Git - Fast Version Control System." HOMEPAGE="http://git.or.cz/" DEPEND=">= dev-libs/expat-2 >= dev-libs/openssl-1.0.0 >= sys-libs/zlib-1.2.5 >= app-arch/cpio-2 >= net-misc/curl-7 >= dev-lang/perl-5.14 >= dev-lang/tk-8.5 >= dev-perl/perl-error-0.17015 >= dev-perl/perl-cgi-3.48 >= dev-perl/net-smtp-ssl-1 >= dev-python/pygtk-2.24 >= dev-util/tla-1.3.5 >= dev-util/quilt-0.48" MANPAGES_SRCFILE="${PNAME}-manpages-${PVER}.tar.bz2" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools perl SRC_URI=( http://kernel.org/pub/software/scm/${PNAME}/${SRCFILE} http://kernel.org/pub/software/scm/${PNAME}/${MANPAGES_SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/git-daemon.rc mirror://${PNAME}/git-daemon.confd ) UP2DATE="updatecmd 'http://kernel.org/pub/software/scm/git/?C=M;O=A' | grep ${PNAME}-[0-9] | lasttarball" src_prepare() { munpack ${SRCFILE} || die munpack ${MANPAGES_SRCFILE} ${SRCDIR} || die cd ${SRCDIR} # we want symbolic links, no hardlinks sed -i 's:ln :ln -s :g' Makefile || die # fix CFLAGS and LDFLAGS too sed -i -e "s:^\(CFLAGS =\).*$:\1 ${CFLAGS} -Wall:" \ -e "s:^\(LDFLAGS =\).*$:\1 ${LDFLAGS}:" \ Makefile || die } src_compile() { cd ${SRCDIR} mmake prefix=/usr gitexecdir=$(mlibdir)/${PNAME}/git-core || die # compile gitweb.cgi too mmake prefix=/usr gitexecdir=$(mlibdir)/${PNAME}/git-core gitweb/gitweb.cgi || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} prefix=/usr gitexecdir=$(mlibdir)/${PNAME}/git-core install || die # install the gtk-gui minstallexec contrib/gitview/gitview || die minstalldocs contrib/gitview/gitview.txt || die # install some nice contribs minstallexec contrib/fast-import/import-tars.perl /usr/bin/import-tars || die minstallexec contrib/fast-import/git-p4 || die minstalldocs contrib/fast-import/git-p4.txt || die # the following are excluded: (from gentoo) # svnimport - use git-svn # p4import - excluded because fast-import has a better one # examples - these are stuff that is not used in git anymore actually # patches - stuff the git guys made to go upstream to other places minstalldir /usr/share/${PNAME}/contrib || die local i for i in continuous fast-import hg-to-git \ hooks remotes2config.sh vim stats \ workdir convert-objects blameview do cp -rf contrib/${i} ${BINDIR}/usr/share/${PNAME}/contrib || die done # install git-web minstalldir /usr/share/${PNAME}/gitweb || die minstallfile gitweb/gitweb.cgi /usr/share/${PNAME}/gitweb || die minstallfile gitweb/gitweb.css /usr/share/${PNAME}/gitweb || die minstallfile gitweb/git-favicon.png /usr/share/${PNAME}/gitweb || die minstallfile gitweb/git-logo.png /usr/share/${PNAME}/gitweb || die # prevent overwriting of the docs cp gitweb/INSTALL{,.gitweb} || die cp gitweb/README{,.gitweb} || die minstalldocs gitweb/INSTALL.gitweb || die minstalldocs gitweb/README.gitweb || die # git daemon rc-script minstallrc git-daemon.rc git-daemon || die minstallconf git-daemon.confd git-daemon || die # install all man pages minstallman man\?/\* || die # install documentation minstalldocs README Documentation/{SubmittingPatches,CodingGuidelines} || die # finally fix perl modules fixlocalpod } postinstall() { echo echo "To use git-web, install an apache-server and point it to '/usr/share/git/gitweb'." echo }