summaryrefslogtreecommitdiffstats
path: root/x264-git/PKGBUILD
blob: 9c0a08b7313ad176c958f6f4ea7829596e3380f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Contributor: zhuqin <zhuqin83@gmail.com>

pkgname=x264-git
pkgver=20100116
pkgrel=1
pkgdesc="free library for encoding H264/AVC video streams"
arch=('i686' 'x86_64')
license=('GPL')
depends=('libx11')
makedepends=('git' 'yasm' 'gettext')
url="http://www.videolan.org/developers/x264.html"
conflicts=('x264')
replaces=(x264-svn)
provides=("x264=$pkgver")
source=()
md5sums=()

_gitroot="git://git.videolan.org/x264.git"
_gitname="x264"

build() {
  cd $srcdir
  msg "Connecting to the GIT server...."
  
  if [[ -d $srcdir/$_gitname ]] ; then
    cd $_gitname
    git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot
  fi
  
  msg "GIT checkout done"
  msg "Starting make..."
  
  rm -rf $srcdir/$_gitname-build
  git clone $srcdir/$_gitname $srcdir/$_gitname-build
  
  cd $srcdir/$_gitname-build

  ./configure --prefix=/usr \
    --enable-visualize \
    --enable-shared \
    --enable-pic || return 1
  
  make || return 1
  make DESTDIR=$pkgdir install || return 1
  
  rm -rf $srcdir/$_gitname-build
}