updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / awn-extras-applets-bzr / PKGBUILD
blob0fd57a32d4db23f0a98cc858ab52fe0e9e62d764
1 # Maintainer: Alessio Sergi <asergi at archlinux dot us>
3 pkgname=awn-extras-applets-bzr
4 _pkgname=awn-extras-applets
5 pkgver=1539
6 pkgrel=1
7 pkgdesc="A collection of applets for avant-window-navigator"
8 arch=('i686' 'x86_64')
9 url="https://launchpad.net/awn-extras"
10 license=('GPL2' 'LGPL2.1')
11 depends=('avant-window-navigator-bzr' 'gnome-menus' \
12          'libnotify' 'libsexy' 'libwebkit' 'vte')
13 makedepends=('bzr' 'intltool' 'vala-012')
14 optdepends=('fortune-mod: animal-farm applet'
15             'gnome-applets: cpufreq applet'
16             'gstreamer0.10-python: volume control applet'
17             'libgweather: weather applet'
18             'python-gdata: calendar applet'
19             'python-gtop: bandwidth-monitor applet'
20             'python-notify: comics, battery applets'
21             'python-rsvg: hardware-sensors, cairo-clock, comics applets'
22             'python-simplejson: feeds applet'
23             'python-vobject: calendar applet'
24             'python-wnck: slickswitcher applet'
25             'python-xklavier: dialect applet'
26             'python2-dateutil: cairo-clock applet'
27             'python2-feedparser: comics, feeds applets'
28             'python2-pyinotify: thinkhdaps applet'
29             'tomboy: tomboy applet')
30 provides=($_pkgname)
31 conflicts=($_pkgname)
32 options=('!libtool')
33 install="$pkgname".install
35 _bzrtrunk="https://code.launchpad.net/~awn-extras/awn-extras/trunk"
36 _bzrmod="awn-extras"
38 build() {
39   cd "$srcdir"
41   msg "Connecting to Bazaar server...."
43   if [[ -d "$_bzrmod" ]]; then
44     cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver"
45     msg "The local files are updated."
46   else
47     bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver"
48   fi
50   msg "Bazaar checkout done or server timeout"
51   msg "Starting build..."
53   rm -rf "$srcdir/$_bzrmod-build"
54   cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build"
55   cd "$srcdir/$_bzrmod-build"
57   # python2 fix
58   find . -type f -name *.py | xargs sed -i 's_^#.*python$_#!/usr/bin/python2_'
59   sed -i 's/async(\"python \"/async(\"python2 \"/' \
60     applets/maintained/shiny-switcher/shinyswitcherapplet.c
62   export PYTHON="/usr/bin/python2"
63   export VALAC="/opt/vala-0.12/bin/valac"
64   export CFLAGS="$CFLAGS -I/usr/include/gio-unix-2.0/"
66   ./autogen.sh --prefix=/usr --sysconfdir=/etc \
67                --datadir=/usr/share --disable-static \
68                --disable-pymod-checks \
69                --with-webkit
70                #--without-gnome   # <-- remove gnome-menus from deps
71                #--with-indicator  # <-- add libindicator as dep
72   make
75 package() {
76   cd "$srcdir/$_bzrmod-build"
78   make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir/" install
80   install -d -m 755 "$pkgdir"/usr/share/gconf/schemas
81   gconf-merge-schema "$pkgdir"/usr/share/gconf/schemas/awn-extras.schemas \
82     "$pkgdir"/etc/gconf/schemas/*.schemas
84   rm -rf "$pkgdir"/etc
85   rm -rf "$pkgdir"/usr/share/locale
88 # vim:set ts=2 sw=2 et: