summaryrefslogtreecommitdiff
path: root/community/avant-window-navigator/PKGBUILD
blob: 3813dd1c39881a3d0d983358e181388a18584884 (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
# $Id: PKGBUILD 30927 2010-10-23 16:23:21Z schuay $
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Timm Preetz <timm@preetz.us>
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=avant-window-navigator
pkgver=0.4.0
pkgrel=10
pkgdesc="Fully customisable dock-like window navigator for GNOME"
arch=('i686' 'x86_64' 'mips64el')
url="https://launchpad.net/awn"
license=('GPL')
# bzr needs to be in depends: see FS#21434
depends=('libwnck' 'gconf' 'python2' 'hicolor-icon-theme' 'pyxdg' 'libgtop' \
         'python-feedparser' 'xdg-utils' 'libdesktop-agnostic' 'dbus-python' 'bzr')
makedepends=('intltool' 'gnome-doc-utils' 'vala')
install=${pkgname}.install
options=('!libtool')
source=(https://edge.launchpad.net/awn/0.4/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz
        'awn-applet-simple.patch')
md5sums=('03654b45dd95cbb83fa7e112bd00523c'
         'abd1200504e6a4a8961a3fe0a4a99363')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  # FS#19084
  patch -p0 < ${srcdir}/awn-applet-simple.patch

  PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/usr/share

  sed -i 's|${prefix}/etc|${prefix}/share|' Makefile

  str='\(.*"theme_tooltip_outline_color".*\)'
  sed -i "s|$str|#\1|" awn-settings/awnSettings.py

  # python2 fix
  sed -i 's_with ("python"_with ("python2"_' applet-activation/main.c
  for file in $(find . -name '*.py' -print); do
      sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
      sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_' $file
  done

  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}

  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${pkgdir} install

  gconf-merge-schema "$pkgdir/usr/share/gconf/awn.schemas" \
    "$pkgdir"/usr/share/gconf/schemas/*.schemas

  rm "$pkgdir"/usr/share/gconf/schemas/*.schemas
  mv "$pkgdir"/usr/share/gconf/{,schemas/}awn.schemas
}
# vim:set ts=2 sw=2 et: