summaryrefslogtreecommitdiff
path: root/pcr/glproto-git/PKGBUILD
blob: 0ff8f2840b56954c47e08d950c84920c3cc5db49 (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
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
# Maintainer: kfgz <kfgz at interia pl>
# Contributor: Cilyan Olowen <gaknar at gmail dot com>
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>

pkgbase=glproto
pkgname=glproto-git
pkgver=$(LC_ALL=C date -u +%Y%m%d)
_pkgver=1.4.16
pkgrel=1
pkgdesc='X11 OpenGL extension wire protocol'
arch=(
  i686
  x86_64
  mips64el
)
url=http://xorg.freedesktop.org/
license=custom
provides=(
  $pkgbase
  "$pkgbase=$_pkgver"
)
conflicts=$pkgbase
makedepends=(
  git
  'xorg-util-macros>=1.2'
)

_gitroot=git://git.freedesktop.org/git/xorg/proto/$pkgbase
_gitname=$pkgbase

build() {
  cd $srcdir
  msg 'Connecting to git.freedesktop.org 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 or server timeout'

  msg 'Creating build directory'
  if [ -d $srcdir/$_gitname-build ]; then rm -rf $srcdir/$_gitname-build; fi
  cp -R $srcdir/$_gitname $srcdir/$_gitname-build

  msg 'Starting make...'
  cd $srcdir/$_gitname-build
  setarch $CARCH ./autogen.sh --prefix=/usr
  setarch $CARCH make
}

package() {
  cd $srcdir/$_gitname-build
  setarch $CARCH make DESTDIR=$pkgdir install
  install -m755 -d $pkgdir/usr/share/licenses/$pkgbase
  install -m644 COPYING $pkgdir/usr/share/licenses/$pkgbase
}