summaryrefslogtreecommitdiff
path: root/community-testing/gnash/PKGBUILD
blob: 68f8264121176c0777ea099b355f07a3597fda92 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# $Id: PKGBUILD 82896 2010-06-18 18:30:20Z ibiru $
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>

pkgbase=gnash
pkgname=(gnash-common gnash-gtk)
pkgver=0.8.9
pkgrel=5
arch=(i686 x86_64)
url="http://www.gnu.org/software/gnash/"
license=(GPL3)
makedepends=(curl giflib libldap sdl agg libjpeg libpng libtool
             speex fontconfig libva ffmpeg libxinerama
             gstreamer0.10-base gstreamer0.10-ffmpeg
             gtk2 libldap xulrunner hicolor-icon-theme desktop-file-utils
             pkgconfig boost)
options=(!libtool !emptydirs)
source=(http://ftp.gnu.org/gnu/gnash/${pkgver}/gnash-${pkgver}.tar.bz2
        gentoo-ffmpeg-0.8.patch)
md5sums=('5b2be6b04a1bcc5fb404cc377034499e'
         '98dec9a5c1b1084245a3f46b4022a6e2')

build() {
  cd "$srcdir/gnash-$pkgver"

  # Consolidated gentoo patches for ffmpeg compatibility
  # as of 2011-10-31
  patch -Np1 -i "$srcdir/gentoo-ffmpeg-0.8.patch"
  ./autogen.sh

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --with-plugins-install=system \
    --with-npapi-plugindir=/usr/lib/mozilla/plugins \
    --enable-gui=sdl,gtk \
    --enable-renderer=agg \
    --enable-media=gst,ffmpeg \
    --enable-hwaccel=vaapi

  make
}

package_gnash-common() {
  pkgdesc="A GNU Flash movie player"
  depends=(curl giflib libldap sdl agg libjpeg libpng libtool
           speex fontconfig libva ffmpeg libxinerama
           gstreamer0.10-base gstreamer0.10-ffmpeg
           boost-libs)
  backup=(etc/gnashrc)

  cd "$srcdir/gnash-$pkgver"

  make DESTDIR="$pkgdir" install

  # Split gnash-gtk
  mkdir -p "$srcdir"/gtk/{bin,man1,share}
  mv "$pkgdir"/usr/bin/{gtk-gnash,gnash-gtk-launcher} "$srcdir/gtk/bin/"
  mv "$pkgdir"/usr/share/man/man1/{gtk-gnash,gnash-gtk-launcher}.1 "$srcdir/gtk/man1/"
  mv "$pkgdir"/usr/share/{applications,icons} "$srcdir/gtk/share/"
  mv "$pkgdir/etc/gnashpluginrc" "$srcdir/gtk/"
}

package_gnash-gtk() {
  pkgdesc="A GNU Flash movie player"
  depends=("gnash-common=$pkgver"
            gtk2 libldap hicolor-icon-theme desktop-file-utils)
  install=gnash-gtk.install
  backup=(etc/gnashpluginrc)

  cd "$srcdir/gnash-$pkgver"

  make DESTDIR="$pkgdir" install-plugin

  install -d "$pkgdir"/{etc,usr/{bin,share/man/man1}}
  mv "$srcdir"/gtk/bin/* "$pkgdir/usr/bin/"
  mv "$srcdir"/gtk/man1/* "$pkgdir/usr/share/man/man1/"
  mv "$srcdir"/gtk/share/* "$pkgdir/usr/share/"
  mv "$srcdir/gtk/gnashpluginrc" "$pkgdir/etc/"
}