summaryrefslogtreecommitdiff
path: root/pcr/kervala_libsquish-hg/PKGBUILD
blob: f75e1aba73babf7642df1592dcbd1831c44cd364 (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
# Maintainer: Jorge Araya <jorgean@lavabit.com>

pkgname=kervala_libsquish-hg
pkgver=220
pkgrel=1
pkgdesc="Free Software DXT compression library, kervala's version"
arch=('i686' 'x86_64')
url="http://code.google.com/p/libsquish/"
license=('MIT')
makedepends=('mercurial' 'gcc-libs')
provides=('libsquish')
conflicts=('libsquish')
source=()

_hgroot="http://hg.kervala.net"
_hgrepo="packaging"

build() {
  cd "$srcdir"
  msg "Connecting to Mercurial server...."

  if [[ -d "$_hgrepo" ]]; then
    cd "$_hgrepo"
    hg pull -u
    msg "The local files are updated."
  else
    hg clone "${_hgroot}/${_hgrepo}"
  fi

  msg "Mercurial checkout done or server timeout"
  msg "Starting build..."

  rm -rf "$srcdir/$_hgrepo-build"
  cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
  cd "$srcdir/$_hgrepo-build/squish"
  make
}

package() {
  cd "$srcdir/$_hgrepo-build/squish"
  mkdir -p ${pkgdir}/usr/local/include
  mkdir -p ${pkgdir}/usr/local/lib
  make -e INSTALL_DIR="$pkgdir/usr/local" install
}

# vim:set ts=2 sw=2 et: