summaryrefslogtreecommitdiff
path: root/pcr/bamf2/PKGBUILD
blob: 5a82289ff9c6aec202abce8c641b3d39eb79d077 (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
# Maintainer (Arch): Ivan de Jesús Pompa García <ivan.pompa@gmx.com>
# Contributors (Arch): niQo ???

pkgname=bamf2
_dname=bamf
pkgver=0.2.126
pkgrel=2
pkgdesc="Removes the headache of applications matching into a simple DBus daemon and c wrapper library, 0.2 branch"
arch=('i686' 'x86_64' 'mips64el')
url="https://launchpad.net/bamf"
license=('GPL')
depends=('dbus-glib' 'libwnck3' 'libgtop')
makedepends=('libwnck' 'vala')
optdepends=('gtk2: GTK+ 2 library')
options=(!libtool)
source=(http://launchpad.net/${_dname}/0.2/${pkgver}/+download/${_dname}-${pkgver}.tar.gz)
md5sums=('709735137e4b028bb94f9e106bb9ac6e')

conflicts=('bamf')
provides=('bamf')

build() {
  cd "$srcdir/${_dname}-${pkgver}"

  # Disable building tests
  sed -i '/tests/ d' Makefile.in

  sed -i -e 's/--c-include/--include/' lib/libbamf/Makefile.in
  export CFLAGS="$CFLAGS -Wno-deprecated-declarations -Wno-unused-local-typedefs"

  [[ -d build-gtk3 ]] || mkdir build-gtk3
  pushd build-gtk3
  ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/${_dname} \
              --disable-static
  make
  popd

  [[ -d build-gtk2 ]] || mkdir build-gtk2
  pushd build-gtk2
  ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/${_dname} \
              --disable-static --with-gtk=2
  make -C lib/libbamf
  popd
}

package() {
  cd "$srcdir/${_dname}-${pkgver}/build-gtk3"
  make DESTDIR="${pkgdir}/" install

  cd "$srcdir/${_dname}-${pkgver}/build-gtk2"
  make -C lib/libbamf DESTDIR="${pkgdir}" install
}