# $Id$ PNAME="git" PVER="2.18.0" PBUILD="r1" PCAT="dev-util" DESCRIPTION="Git - Fast Version Control System." HOMEPAGE="http://git.or.cz/" DEPEND=">= dev-libs/expat-2 >= dev-libs/openssl-1.0.2 >= sys-libs/zlib-1.2.8 >= app-arch/cpio-2 >= net-misc/curl-7 >= dev-lang/perl-5.24.1 >= dev-lang/tk-8.6 >= dev-perl/perl-error-0.17024 >= dev-perl/perl-cgi-4.35 >= dev-perl/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.xz" SRCFILE="${PNAME}-${PVER}.tar.xz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools perl systemd SRC_URI=( http://git-core.googlecode.com/files/${SRCFILE} http://git-core.googlecode.com/files/${MANPAGES_SRCFILE} http://kernel.org/pub/software/scm/${PNAME}/${SRCFILE} http://kernel.org/pub/software/scm/${PNAME}/${MANPAGES_SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/git-daemon.service mirror://${PNAME}/git-daemon.confd ) #UP2DATE="updatecmd http://code.google.com/p/git-core/downloads/list | grep ${PNAME}-[0-9] | firsttarball gz" UP2DATE="updatecmd https://www.kernel.org/pub/software/scm/${PNAME}/ | grep ${PNAME}-[0-9] | highesttarball xz" 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 || 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 git-p4 || die minstalldocs contrib/fast-import/git-p4.README || 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 #convert-objects for i in fast-import hg-to-git \ hooks remotes2config.sh \ workdir do cp -rf contrib/${i} ${BINDIR}/usr/share/${PNAME}/contrib || die done # install git-web mmake DESTDIR=${BINDIR} gitwebdir=/usr/share/${PNAME}/gitweb install-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 systemd unit minstallunit git-daemon.service || 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 }