summaryrefslogtreecommitdiff
path: root/community/dockmanager/PKGBUILD
blob: 11248a9b5f53e63fc5017e154f1e41492892a0a6 (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
# $Id: PKGBUILD 39549 2011-02-11 14:30:10Z heftig $
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>

pkgname=dockmanager
pkgver=0.1.0
pkgrel=0.20110211
pkgdesc="Dock-independent helper scripts for compatible docks"
url="https://launchpad.net/dockmanager"
arch=(i686 x86_64 'mips64el')
license=(GPL)
depends=('libdesktop-agnostic>=0.3.90-2' gconf dbus-glib python2)
makedepends=(bzr 'vala>=0.10' pkgconfig intltool autoconf gnome-common)
conflicts=(dockmanager-bzr)
provides=("dockmanager-bzr")
options=('!libtool' '!emptydirs')
install=dockmanager.install
source=(vala.patch)
md5sums=('f6db8c3a432b41b620f6fcc8bfccfd81')

__bzrtrunk=lp:dockmanager
__bzrmod=dockmanager

build() {
  cd "$srcdir"

  msg2 "Connecting to Launchpad...."

  if [ -d $__bzrmod ] ; then
    ( cd $__bzrmod && bzr up ) || warning "Bzr up failed!"
  else
    bzr checkout $__bzrtrunk $__bzrmod
  fi

  msg2 "BZR checkout done or server timeout"

  rm -rf $pkgname-build
  cp -r $__bzrmod $pkgname-build
  cd $pkgname-build

  msg2 "Starting make..."

  patch -Np0 -i "$srcdir/vala.patch"

  ./autogen.sh \
    --prefix=/usr \
    --libexecdir=/usr/lib \
    --sysconfdir=/etc

  make
}

package() {
  cd "$srcdir/$pkgname-build"

  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install

  # Fix for python2
  find $pkgdir -type f -exec sed -i '1s|#!/usr/bin/env python$|&2|' {} +

  mkdir -p "$pkgdir/usr/share/gconf/schemas"
  gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/dockmanager.schemas" "$pkgdir"/etc/gconf/schemas/*.schemas
  rm -rf "$pkgdir/etc/gconf"
}