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
# Maintainer: Jan "heftig" Steffens <[email protected]>
pkgname=lightspark-git
pkgver=20100617
pkgrel=1
pkgdesc="An alternative Flash Player for Linux - Flash for real. Now."
arch=(i686 x86_64)
url="http://lightspark.sourceforge.net"
license=(GPL3)
depends=(mesa ftgl sdl gtk2 gtkglext curl ffmpeg glew ttf-liberation pcre pulseaudio) 
makedepends=(git cmake nasm xulrunner llvm pkgconfig glproto)
provides=(lightspark)

_gitroot="git://github.com/alexp-sssup/lightspark.git"
_gitname="lightspark"

build() {
  cd "$srcdir"
  msg2 "Connecting to github...."

  if [ -d $_gitname ] ; then
    ( cd $_gitname && git pull )
  else
    git clone $_gitroot $_gitname || return 1
  fi

  msg2 "Git checkout done or server timeout"

  rm -rf $_gitname-build
  git clone -s $_gitname $_gitname-build
  cd $_gitname-build

  msg2 "Patching..."

  sed -e '/^pkg_check_modules/s/glew//' \
      -i CMakeLists.txt

  sed -e 's/lib64/lib/' \
      -i CMakeLists.txt


  msg2 "Starting make..."

  LDFLAGS+=" -L /usr/lib/llvm"

  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCOMPILE_PLUGIN=1 .
  make
} 

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

  chmod 755 "$pkgdir"/usr/{bin/lightspark,lib/mozilla/plugins/liblightsparkplugin.so} || return 1

  cd "$srcdir/$_gitname"
  install -Dm644 debian/lightspark.1 "$pkgdir/usr/share/man/man1/lightspark.1" || return 1
}