PKGBUILD 2.87 KB
Newer Older
1 2 3 4 5 6
#
# Core Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>

manutortosa's avatar
manutortosa committed
7
pkgname=git
philm's avatar
philm committed
8
pkgver=1.7.5.3
9
pkgrel=2
manutortosa's avatar
manutortosa committed
10 11 12 13
pkgdesc="the fast distributed version control system"
arch=(i686 x86_64)
url="http://git-scm.com/"
license=('GPL2')
Phil's avatar
Phil committed
14
depends=('curl' 'expat>=2.0' 'perl-error' 'perl>=5.10.1')
15
makedepends=('python2')
manutortosa's avatar
manutortosa committed
16 17 18
optdepends=('tk: gitk and git gui'
            'perl-libwww: git svn'
            'perl-term-readkey: git svn'
19 20
            'perl-net-smtp-ssl: git send-email TLS support'
            'python2: various helper scripts'
manutortosa's avatar
manutortosa committed
21 22 23 24
            'subversion: git svn'
            'cvsps: git cvsimport')
replaces=('git-core')
provides=('git-core')
25
backup=('etc/conf.d/git-daemon.conf')
manutortosa's avatar
manutortosa committed
26
source=("http://kernel.org/pub/software/scm/git/${pkgname}-${pkgver}.tar.bz2" \
27 28 29 30
        "http://kernel.org/pub/software/scm/git/git-manpages-${pkgver}.tar.bz2"
        git-daemon
        git-daemon.conf)

philm's avatar
philm committed
31 32
md5sums=('5b5a5e6c1c5c05db6b8dd33e6f3acea4'
         '6733ecbb5a46d9879463f963ae2a2dbb'
Phil's avatar
Phil committed
33 34
         '8e2648910fd5dd4f1c41d3c7fa9e9156'
         '2e42bf97779a1c6411d89043334c9e78')
philm's avatar
philm committed
35 36
sha256sums=('8017b0c624fea88bf5488d35f3839778fac3c0e089a02fe0017aea6913af3292'
            '018f5c16b9a3c4e4942ae318d1faea0b6092287228069a718efd267b9f98b8c8'
Phil's avatar
Phil committed
37 38
            '2e0a50bdaf8f387a499895e1c204bff78244eaa72b78187c8a84ef40c0b82598'
            'e8bfe29d8393d2b87517c4dd56ea834b213aa00bf3d7fcde4ead3457cadbbc68')
manutortosa's avatar
manutortosa committed
39 40

build() {
41 42
  export PYTHON_PATH='/usr/bin/python2'
  cd "$srcdir/$pkgname-$pkgver"
Phil's avatar
Phil committed
43
  make prefix=/usr gitexecdir=/usr/lib/git-core 
manutortosa's avatar
manutortosa committed
44 45 46
}

package() {
47 48
  export PYTHON_PATH='/usr/bin/python2'
  cd "$srcdir/$pkgname-$pkgver"
manutortosa's avatar
manutortosa committed
49 50
  make prefix=/usr gitexecdir=/usr/lib/git-core \
    NO_CROSS_DIRECTORY_HARDLINKS=1 \
Phil's avatar
Phil committed
51
    INSTALLDIRS=vendor DESTDIR=${pkgdir} install 
52

manutortosa's avatar
manutortosa committed
53 54
  # bash completion
  mkdir -p $pkgdir/etc/bash_completion.d/
Phil's avatar
Phil committed
55
  install -m644 ./contrib/completion/git-completion.bash $pkgdir/etc/bash_completion.d/git 
manutortosa's avatar
manutortosa committed
56
  # more contrib stuff
Phil's avatar
Phil committed
57
  cp -a ./contrib $pkgdir/usr/share/git/ 
58 59 60 61 62 63 64 65 66 67
  # scripts are for python 2.x
  sed -i 's|#![ ]*/usr/bin/env python|#!/usr/bin/env python2|' \
    $(find "$pkgdir" -name '*.py') \
    "$pkgdir"/usr/share/git/{fast-import/git-p4,gitview/gitview}

  # emacs interface
  mkdir -p $pkgdir/usr/share/emacs/site-lisp
  mv $pkgdir/usr/share/git/emacs $pkgdir/usr/share/emacs/site-lisp/git
  rm $pkgdir/usr/share/emacs/site-lisp/git/.gitignore

manutortosa's avatar
manutortosa committed
68 69 70 71 72 73 74 75 76
  # how 'bout some manpages?
  for mansect in man1 man5 man7; do
    for manpage in $srcdir/$mansect/*; do
      install -D -m644 $manpage $pkgdir/usr/share/man/$mansect/$(basename $manpage)
    done
  done

  # remove perllocal.pod, .packlist, and empty directories.
  rm -rf $pkgdir/usr/lib/perl5
77 78 79 80

  # git daemon script
  install -D -m755 $srcdir/git-daemon $pkgdir/etc/rc.d/git-daemon
  install -D -m644 $srcdir/git-daemon.conf $pkgdir/etc/conf.d/git-daemon.conf
manutortosa's avatar
manutortosa committed
81 82
}

83