summaryrefslogtreecommitdiffstats
path: root/lrzip-git/PKGBUILD
blob: ccfad088192ba63d08db39cc8128ecaff5954369 (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
# Maintainer: Raghavendra Prabhu 'tlonim' < raghu . prabhu13 AT gmail dot com >

pkgname=lrzip-git
pkgver=20110310
pkgrel=1
pkgdesc="Lzma RZIP by Con Kolivas"
arch=('i686' 'x86_64')
url="http://github.com/ckolivas/lrzip"
license=('GPL')
provides=('lrzip')
conflicts=('lrzip')
makedepends=('git')

depends=('lzo2' 'bzip2' 'zlib')
[[ $CARCH == i686 ]] && depends+=('nasm')

_gitroot="git://github.com/ckolivas/lrzip"
_gitname="lrzip"

build() {
  cd "$srcdir"

  if [ -d $_gitname ] ; then
    (cd $_gitname && git pull origin) || warning "Git pull failed!"
  else
    git clone $_gitroot $_gitname
  fi

  rm -rf $_gitname-build
  git clone "$srcdir/$_gitname" $_gitname-build
  cd $_gitname-build

  # CFLAGS recommended by developer 
  CFLAGS="${CFLAGS/-O2/-O3} -fomit-frame-pointer"
  CXXFLAGS="${CXXFLAGS/-O2/-O3} -fomit-frame-pointer"
 
  if [[ $CARCH == i686 ]];then
      ./autogen.sh --prefix=/usr --enable-asm
  else
      ./autogen.sh --prefix=/usr
  fi

  make
}

package() {
  cd "$srcdir/$_gitname-build"
  make DESTDIR="$pkgdir/" install
}