summaryrefslogtreecommitdiff
path: root/community-testing/gnash/PKGBUILD
blob: 251a9f65b9aea87f75af801ceb4396787dc84430 (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
80
81
# $Id: PKGBUILD 66994 2012-03-03 08:11:56Z ibiru $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgbase=gnash
pkgname=(gnash-common gnash-gtk)
pkgver=0.8.10
pkgrel=2
arch=(i686 x86_64)
url="http://www.gnu.org/software/gnash/"
license=(GPL3)
makedepends=(curl giflib libldap sdl agg libjpeg libpng libtool
             speex fontconfig ffmpeg
             gstreamer0.10-base gstreamer0.10-ffmpeg
             gtk2 libldap xulrunner hicolor-icon-theme desktop-file-utils gconf
             pkgconfig boost)
options=(!libtool !emptydirs)
source=(http://ftp.gnu.org/gnu/gnash/${pkgver}/gnash-${pkgver}.tar.bz2
        nodebug.patch)
sha256sums=('9625072e45df92baa2c28fc9999d4e2deb66bc827530baedfad2e4e2292d1224'
            '0ebb104a7632af997c7e6b268755949fa0c1eea5e32015b95a22d63d0e431551')

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

  # Disable very, very verbose debugging (gigabytes of logs)
  patch -Np1 -i "$srcdir/nodebug.patch"

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

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/      func_append compile_command " -Wl,-O1,--as-needed"\n      func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool

  make
}

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

  cd "$srcdir/gnash-$pkgver"

  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install

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

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

  mv "$srcdir"/gtk/* "$pkgdir"
  
  cd "$srcdir/gnash-$pkgver"
  make DESTDIR="$pkgdir" install-plugin

  install -m755 -d "$pkgdir/usr/share/gconf/schemas"
  gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/gnash.schemas" --domain gnash \
    "$pkgdir"/usr/share/applications/*.schemas
  rm -f "$pkgdir"/usr/share/applications/*.schemas
}